Plot Studio
Timing waveforms, function plots, contour maps and rotatable 3-D surfaces from a few lines of JSON. The same blocks work in the Markdown Studio (as ```wave, ```plot, ```contour, ```surface3d fences) and on any page of this site.
Editor and preview
The preview updates as you type. Your last figure is kept in this browser.
Preview
Syntax reference
Timing waveform — WaveDrom-style characters
| Character | Meaning |
|---|---|
p n | Clock starting with a rising / falling edge (P N add an edge arrow) |
1 0 (h l) | High / low |
= 2–9 | Bus value; labels come from "data" in order (digits pick a tint) |
x / z | Unknown (hatched) / high-impedance |
u d | Pulled up / down (dashed) |
. / | | Continue the previous state / continue with a gap mark |
Each character is one cycle. Options: "period" per signal (e.g. 2 for a half-rate clock), "hscale", "ticks": false, "tickStart". Nest signals in groups with ["Group name", {…}, {…}]; {} adds a spacer row.
Function plot
"x": [min, max], optional "y": [min, max], "xLabel", "yLabel", "samples". "functions": [{ "label": "…", "expr": "…" }] in x; "points": [{ "label": "…", "data": [[x, y], …], "line": true }] for measured data.
Contour map and 3-D surface
"expr" in x and y, "x" and "y" ranges, "resolution", labels ("zLabel" too). Contours: "levels" as a count or a list, "fill": false for lines only. Surfaces: "azimuth", "elevation", "zScale".
Expressions
+ − * / ^ %, parentheses, implicit multiplication (2x, 3(x+1)), constants pi, e, tau, and sin cos tan asin acos atan sinh cosh tanh exp ln log log10 log2 sqrt cbrt abs floor ceil round sign min max pow atan2 hypot step sinc. Expressions are parsed, never executed as code.
Embedding on a page
Put the JSON inside <pre data-viz="wave">…</pre> (or plot / contour / surface3d). The site script loads the renderer automatically; without JavaScript the JSON stays readable.