Scientific visualization against the web rivals

Batch 182, 2026-11-10. This page compares @margoengine/sciviz with the scientific and charting libraries people use on the web today. It has four parts: features, measured scenes, accuracy against closed-form answers, and losses. Nothing here is a speed claim. Every timed number waits for the quiet-machine run (see "Losses and pending timing"). The public page is site/sciviz/compare.html (site/sciviz/compare.html).

How to read the feature rows

Rival documentation read on 2026-11-10: VTK.js 38.0.5 (API docs), Plotly.js 4.2.0 (reference), deck.gl 9.4.1 (layers), ECharts 6.1.0 and ECharts-GL 2.1.0 (features), regl-scatterplot 1.16.0 (README), Cosmograph 2.5.1 (config reference), Neuroglancer (data sources), Bokeh (linking), Vega-Lite (selections, transforms), ParaView Glance (readers). Unversioned rows are the documentation current on that date.

Feature rows

RowMargo (evidence)Web rivals (their docs)Desktop tools (expectation)
Chart typesscatter, line, bar, histogram, heatmap, surface, contour, error bars, box, violin, area, density, parallel coordinates, polar, ternary, Sankey and more (tests/charts.test.js, tests/stats.test.js, tests/charts-extra.test.js, tests/parcoords.test.js, tests/contour2d.test.js). SPLOM exists in src/parcoords.ts with no test yetPlotly lists 40+ trace types; ECharts 20+ series; Vega-Lite composes marks with transformsMatplotlib-style breadth
3D scalar volume1D and 2D transfer functions, pre-integration, label maps, MIP, ambient occlusion, shadows, GPU and CPU isosurfaces (tests/transfer.test.js, tests/labels.test.js, tests/cinematic.test.js, tests/fallback.test.js)VTK.js volume mapper: composite, additive, MIP, MinIP; Plotly volume and isosurface tracesParaView and Slicer: all of these plus multi-volume
Vector and tensorquiver, RK4 streamlines, particles and pathlines, LIC, tubes and ribbons, tensor glyphs, DTI fibre tracking (README "Vector fields", tests/flow.test.js, tests/lic.test.js, tests/tubes.test.js, tests/tensor.test.js, tests/tensor-real.test.js)Plotly cone and streamtube traces; VTK.js glyph mapperParaView stream tracer, LIC, tensor glyphs
Volume scalebricked level-of-detail volumes, OME-Zarr multiscale, N5, precomputed chunks (README "Bricked volumes", tests/bricks.test.js, tests/omezarr.test.js)Neuroglancer reads precomputed, N5 and OME-Zarr chunked sourcesOut-of-core readers
Grid typesimage, structured, rectilinear, curvilinear, unstructured, polydata, multiblock, polyhedra, higher-order cells, AMR (tests/grids.test.js, tests/datasets.test.js, tests/datasets-elements.test.js, tests/amr.test.js)VTK.js documents ImageData and PolyDataParaView: every VTK data type
FormatsNRRD, NIfTI, DICOM, Zarr, VTK legacy and XML, NetCDF classic, HDF5, CGNS, Xdmf, Exodus, OpenFOAM, EnSight, FITS, MRC, OME-TIFF, Arrow, Parquet, CSV (tests/nrrd.test.js, tests/formats.test.js, tests/climate-formats.test.js, tests/hdf5.test.js, tests/engineering.test.js, tests/astronomy.test.js, tests/table.test.js). Zarr Blosc and Zstandard are not supported (README "Medical and array formats")ParaView Glance lists its readers through ITK and VTK.jsParaView and VisIt read hundreds of formats
Scalepoint budget option, exact binary64 aggregation, additive point octree (README "Figures", tests/aggregate.test.js, tests/pointcloud.test.js)deck.gl performance guide, regl-scatterplot and Cosmograph document million-scale renderingDatashader-style aggregation
Interactionhover, pick, box and lasso, linked selection across figures, cross-filter, annotations, measurement (README "Picking, tooltips and selection", tests/pick.test.js, tests/link.test.js, tests/annotate.test.js)Bokeh linked brushing; Vega-Lite union and intersect selectionsLinked views and rulers
Analysis filterscontour, clip, probe, calculator, gradient, glyph in a re-executing pipeline (tests/datasets.test.js, tests/contour.test.js, tests/clip.test.js, tests/probe.test.js, tests/calc.test.js, tests/glyph.test.js). Threshold, plot over line, integrate, resample, warp and connectivity: not foundVega-Lite table transforms; VTK.js has few grid filtersParaView: all of these
Multi-viewlinked cameras, comparative grids, orthogonal slice views (tests/views.test.js)Vega-Lite concatenation with shared scalesSlicer and ParaView linked views
PublicationPNG with physical size, SVG, vector 3D, PDF, TeX labels, video (tests/export-media.test.js, tests/export-vector.test.js, tests/pdf.test.js, tests/math.test.js; video in tests/export-media-browser.mjs)Plotly static export (3D rasterized), Bokeh SVG and PNG exportVector and raster export
AccessibilityARIA summaries, keyboard data navigation, sonification (tests/a11y.test.js)ECharts ARIA descriptions and decals; Vega-Lite ARIA on SVGLittle
NotebookJupyter widget through anywidget (tests/notebook.test.js, python/)Plotly, Bokeh, pydeck, Altair widgetsJupyter
Sharingversioned figure spec, URL state, standalone HTML, provenance (tests/spec.test.js, tests/share.test.js, tests/provenance.test.js)Neuroglancer URL state; Glance standalone HTMLState files
Geo and timetile level of detail, vector tiles, time-dynamic layers, CF conventions, projections (README "Geographic layers", tests/geo-lod.test.js, tests/geo-vector.test.js, tests/geo-time.test.js, tests/cf.test.js, tests/projections.test.js)deck.gl tile and geo layers; CesiumJS globeGIS tools
PlatformWebGPU first, native WebGL2 path, GPU picking, progressive rendering (README "A first WebGPU figure", "Native WebGL2 drawing", tests/webgl2.test.js, tests/pick-gpu.test.js, tests/progressive.test.js)WebGL2 throughout; deck.gl documents partial WebGPUNative GPU

Measured scenes

npm run sciviz:compare runs each case in one headless page: Margo and one rival draw the same data at 256 x 256 pixels with the same camera, background and colour. Six rivals are installed outside this repository under the engine-bench folder (MARGO_ENGINE_BENCH overrides it). Only their documented public APIs are called.

SceneRivalReal dataScales in the timed run
volumeVTK.jsMRI head (examples/assets/sciviz/head.nrrd), one shared nearest-neighbour cube64, 128, 256, 512 voxels per axis
isosurfaceVTK.jsthe same MRI cube, level 0.532, 64, 128, 256 voxels per axis
scatterPlotly, deck.gl, ECharts-GL, regl-scatterplotNYC TLC taxi trips (limits/taxi.csv), distance against fare1,024 to 16,777,216 points
linePlotly, ECharts-GLthe same taxi rows as one polyline1,024 to 1,048,576 vertices
heatmapPlotlytaxi rows binned on both sides from one shared count grid32 to 1,024 cells per axis
streamlinesVTK.jsNOAA daily mean winds (wind.bin)8 to 512 seeds per axis
graphCosmographOpenAlex citation graph (tests/fixtures/graph-gpu/openalex.json)1 to 256 copies
tilesdeck.glthe repository's geo level-of-detail tileszoom 1 to 6

Rows past the source size repeat the source rows and say so in the JSON (replicated: true); nothing is synthesized or resized silently. Each run records the commit, GPU, browser, driver and CPU load, the image difference of the last pair, exact repeat-frame equality on both sides, public GPU API call counts per frame and memory where the library exposes it.

Smoke results (one run, no timing)

The smoke on 2026-11-10 (RTX A6000, Edge 157 headless, the batch 182 tree before its commit, so the record says dirty: true) ran every scene once at its first scale with --runs=1. No clock was read. Every case drew a non-empty image and repeated it byte for byte on both sides. The raw records are in results/batch182-smoke.json (docs/whitepaper/results/batch182-smoke.json).

SceneRivalMean RGB difference (0 to 255)Pixels over 8 levelsMargo draws / passes per frameRival draws per frame
volume (64)vtk0.340.8 %5 / 91
isosurface (32)vtk2.604.3 %1 / 31
scatter (1024)plotly1.263.3 %1 / 31
scatter (1024)deck0.973.3 %1 / 31
scatter (1024)echarts1.344.1 %1 / 31
scatter (1024)regl1.153.3 %1 / 32
line (1024)plotly1.034.5 %1 / 3none (PNG or SVG path)
line (1024)echarts1.816.1 %1 / 31
heatmap (32)plotly0.010.0 %1 / 3none (PNG or SVG path)
streamlines (8)vtk4.4615.1 %1 / 31
graph (1)cosmograph23.0634.9 %2 / 33
tiles (1)deck4.7123.3 %4 / 34

Image differences are observations, not pass marks. They come from different antialiasing, point and line rasterization, interpolation and storage precision. They are not used to accept or reject a run. The graph row has the largest difference: Cosmograph draws links dimmer than the shared colour at width 1 and adds an attribution overlay outside its canvas; the node layout matches.

Explicit differences in work

Accuracy against closed-form answers

All four run in the normal sciviz CPU tests. Each runs at two resolutions and requires the error to fall by more than three times when the spacing halves (second order gives four), and the fine error to stay below the grid spacing squared.

ReferenceMargo resultTest
Beer-Lambert: pre-integrated opacity of constant extinction and linear colouralpha within 1/510, colours within 0.0021 of the analytic integraltests/transfer.test.js "preintegration matches constant optical depth"
Sphere r = 0.7 isosurface, area 4 pi r^2 and volume 4/3 pi r^3relative error 0.25 % then 0.062 % (area), 0.47 % then 0.12 % (volume) at 33 and 65 samples per axistests/analytic-references.test.js
ABC flow streamline (A = sqrt 3, B = sqrt 2, C = 1), against a float64 RK4 of the analytic fieldend-point distance 0.0053 then 0.0013 after one time unittests/analytic-references.test.js
Isoline of x^2 + y^2 = 0.25largest radial error 0.00094 then 0.00024, one closed linetests/analytic-references.test.js

Rival accuracy rows are not measured: running these references through the rivals needs their own extraction APIs and is listed as open work.

Losses and pending timing

LossCausePlan
Volume-64 frame slower than VTK.js 38.0.5 (1.500 against 1.300 ms, busy machine, diagnostic, perf history entry 102, known-bugs)The historical scene used unequal sampling and lighting; Margo also does depth capture and composition (above). Two matrix allocations per frame were removed with an exact work-count testQuiet rerun of legacy-64 and the isotropic 64 and 128 controls (sciviz-rivals.md (docs/sciviz-rivals.md)); a loss on the like-for-like control is fixed as a bug
Every other sceneNot timed yetQuiet run: --runs=7, every scale, sweeps to the 16.7 ms frame and to failure; every loss lands in this table

Timing pending the quiet rerun. The quiet run publishes every sample, both minima and the environment, losses included.

Not found in Margo today

MinIP, multi-component and general multi-volume compositing, the threshold, plot-over-line, integrate, resample, warp and connectivity filters, Zarr Blosc and Zstandard, and a SPLOM test. These are listed in docs/known-bugs.md under "Sciviz comparison gaps".

Reproduce

npm run build:packages
npm run sciviz:compare -- --runs=1            # smoke: installs the rivals outside the repo, no clock
npm run sciviz:compare -- --list              # every case and scale
node --test packages/sciviz/tests/analytic-references.test.js packages/sciviz/tests/transfer.test.js

The timed run needs the active speed phase (MARGO_SPEED_PHASE=active) and takes the GPU alone; see reproduce.md (docs/whitepaper/reproduce.md).