$mol_plot
Fastest plot lib for vector graphics.
Benchmarks
Real life usages
NPM usage
npm install mol_plot_all
import {
$mol_plot_pane,
$mol_plot_map_heat,
$mol_wire_atom,
} from 'mol_plot_all'
const width = 20;
const height = 200;
const length = width * height;
const map = new $mol_plot_map_heat();
map.series_x = () => Array.from({ length }, (_, i) => i % width);
map.series_y = () => Array.from({ length }, (_, i) => Math.floor(i / width));
const source = new $mol_wire_atom( 'source', ()=> {
setTimeout( ()=> source.absorb(), 1000 )
return Array.from({ length }, (_, i) => Math.floor(Math.random() * 20) * 1000)
} )
map.series_z = () => source.sync()
const pane = new $mol_plot_pane();
pane.zoom = next => pane.scale_y( next )
pane.graphs = () => [map];
document.body.appendChild(pane.dom_node());
const alive = pane.autorun()
Online sandbox