lmplot 0.3.1 · WebAssembly

gnuplot in your browser, driven by lmcode.

One fixed WebAssembly host, lmplot.wasm (4.6 MB), holds gnuplot, the lmcode virtual machine and the Plot functions. Each example below is application code: a few kilobytes of lmcode bytecode the page loads at run time and the host executes. New plots never need a new wasm build.

System layer · C/C++ → wasm

gnuplot (pinned, patched), lmplot's PNG rasterizer and fonts, the lmcode-cpp VM, and the 13 host functions of schema/lmplot.dsl.json. Built once with Emscripten; runs in a Worker; a fresh instance per run.

Application layer · lmcode

plot.data, plot.cmd, plot.num, plot.png… Configuration, data, computation and drawing commands live in the program. Loaded as bytecode (browser/examples/<name>.bin) or embedded as an asset.

Thumbnails were rendered by the same wasm host. Open an example to run it live, or run every example now and time it.

Showcase

Model evaluation

gnuplot gallery