Skip to content

<notatio-plot>

<notatio-plot value="Sin(x)" domain="-6.28,6.28"> -- a 2-D line plot of a univariate expression. value is notatio (the restricted-Epsil subset) by default, and accepts LaTeX inside a $…$ island. Samples the expression across domain by substituting var (defaults to the sole free variable) and taking the numeric value. compute-engine is loaded on demand.

A list of expressions ({Sin(x), Cos(x)}) overlays one series per entry; a list of numeric pairs is plotted as data (ListPlot). parametric reads a pair (x(t), y(t)) as a curve traced over domain in var; mode picks line or points (data defaults to points, functions to lines). Hovering reads out the nearest sample of each series. Function curves are sampled adaptively (à la Plot's refinement) unless adaptive="false".

params adds Manipulate-style controls whose values fill the matching named wildcards (_a, _b) in value — compute-engine's own slot notation — and re-sample live, e.g. params="{a, 1, 5}; {b, 0, 6.28}" over value="Sin(_a * x + _b)". The bare symbol left after the slots are filled is the plot variable.

Stories in the playground·packages/notatio-lit/src/notatio-plot.ts· in Vue: <Plot>

Attributes

AttributeTypeDefaultNotes
valuestring""The curve, in notatio. A list ({f, g}) overlays a series each; a list of pairs is data.
varstring""The plot variable; defaults to the sole free symbol left after the slots are filled.
domainstring"-6.283185,6.283185"The sampling range, as lo,hi.
samplesnumber160Sample count across the domain. Adaptive refinement adds more where the curve bends.
axesstring"true""false" hides the axes.
x-scale
property xScale
string"linear"Scaling function for x: linear, log, log10, log2 or sqrt.
y-scale
property yScale
string"linear"Scaling function for y.
parametricstring"false"Anything but "false" reads value as a pair (x(t), y(t)) traced over domain.
modestring""line or points; data defaults to points and functions to lines.
adaptivestring"true""false" samples on a uniform grid instead of refining where the curve bends.
plot-range
property plotRange
string""Clamp the y range, as lo,hi; empty fits the samples.
epilogstring""Marks drawn over the curve, as notatio graphics primitives: Point((1, 0.5)), Line([...]), Circle(c, r), Text("t", p). Wolfram's Epilog.
prologstring""Marks drawn under the curve; Wolfram's Prolog.
gridstring"false"Anything but "false" draws grid lines.
fillstring"false"Anything but "false" fills between the curve and the axis.
legendstring"false"Anything but "false" draws a series legend.
x-label
property xLabel
string""Axis label for x.
y-label
property yLabel
string""Axis label for y.
labelstring""Caption drawn above the plot.
color-by
property colorBy
string""x or y colours the curve along that coordinate rather than by series.
paramsstring""Manipulate-style controls, e.g. {a, 1, 5}, filling the _a wildcards in value.
loopLoop | ""== "reflect" || this.loop === "none" ? this.loop : "cycle"), setLoop: (loop) => (this.loop = loop), interval: 120, motion: "grid", update: () => this.requestUpdate(), }, openPlaybackMenu, LONG_PRESS_MS, )What a playing slider does at the ends: cycle (default), reflect or none.reflects