Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Performance

Measured against matplotlib (Python) and the Rust libraries plotters, ruviz, kuva and charts-rs: the same charts, separate processes, medians (Intel(R) Core(TM) Ultra 7 255HX, NVIDIA GeForce RTX 5070 Ti Laptop GPU, Linux). Full results, method and the code to rerun them: dataviz-examples/benchmarks.

Compared with matplotlib: 8–53× faster for charts saved to PNG, 28× faster for a live 100 000-point chart, and 178× less memory for 10 M points.

Charts to an 800×600 PNG (one thread, time per chart):

Chartdatavizplottersruvizkuvacharts-rsmatplotlib
line, 1 000 points1.50 ms1.66 ms3.60 ms4.98 ms11.1 ms29.3 ms
bar, 20 bars0.79 ms0.83 ms3.90 ms3.55 ms2.08 ms41.8 ms
scatter, 10 000 points2.12 ms2.83 ms4.37 ms8.53 ms76.2 ms37.5 ms
scatter, 100 000 points9.88 ms16.6 ms16.9 ms17.4 ms784.5 ms81.8 ms
line, 100 000 points2.17 ms5.91 ms8.39 ms28.2 ms829.7 ms50.2 ms
histogram, 1 M values2.06 ms2.76 ms30.2 ms16.1 ms12.8 ms49.6 ms

Big data (time / memory above the data itself):

Chartdatavizdataviz all coresplottersruvizkuvacharts-rsmatplotlib
line, 10 M points129.0 ms / +7 MB103.1 ms / +6 MB481.9 ms / +315 MB332.5 ms / +389 MB2.70 s / +787 MBfails533.1 ms / +1162 MB
scatter, 10 M points230.3 ms / +8 MB181.6 ms / +7 MB1.53 s / +12 MB1.23 s / +376 MB1.56 s / +788 MBfails5.08 s / +910 MB
histogram, 100 M values243.5 ms / +7 MB235.2 ms / +6 MB264.6 ms / +12 MB3.64 s / +1915 MB1.64 s / +1551 MB1.23 s / +1533 MB516.6 ms / +13 MB

Live chart (rolling window, one new point and a full redraw per frame; latency p50 / CPU per frame / memory of the process):

Windowdataviz 1 threaddataviz all coresdataviz GPUplottersruvizkuvamatplotlib
1 000 points, 800×6000.77 ms / 0.77 ms / 7 MB0.49 ms / 2.57 ms / 8 MB0.67 ms / 0.47 ms / 214 MB0.65 ms / 0.63 ms / 14 MB4.66 ms / 4.67 ms / 11 MB5.26 ms / 5.23 ms / 27 MB10.1 ms / 10.1 ms / 73 MB
100 000 points, 800×6002.20 ms / 2.17 ms / 12 MB2.02 ms / 4.67 ms / 13 MB2.04 ms / 1.63 ms / 219 MB5.40 ms / 5.37 ms / 16 MB34.6 ms / 34.6 ms / 17 MB47.0 ms / 47.1 ms / 36 MB62.0 ms / 62.0 ms / 112 MB
1 000 points, 1920×10801.69 ms / 1.70 ms / 15 MB0.77 ms / 5.83 ms / 17 MB1.39 ms / 1.23 ms / 221 MB1.48 ms / 1.50 ms / 18 MB17.4 ms / 17.4 ms / 18 MB18.0 ms / 18.0 ms / 33 MB12.4 ms / 12.6 ms / 79 MB
100 000 points, 1920×10805.51 ms / 5.53 ms / 18 MB3.25 ms / 14.1 ms / 20 MB2.70 ms / 2.53 ms / 225 MB8.43 ms / 8.43 ms / 21 MB119.9 ms / 119.9 ms / 28 MB115.8 ms / 115.8 ms / 42 MB136.8 ms / 136.8 ms / 177 MB

Animated GIF (800×600, 120 frames; time, file size):

Animationdatavizplottersruvizmatplotlib
whole plot moves282.0 ms, 1001 KB1.09 s, 3227 KB3.00 s, 1741 KB5.24 s, 1119 KB
line grows on fixed axes81.0 ms, 38 KB2.40 s, 3257 KB2.91 s, 1701 KB5.75 s, 420 KB

3D charts (800×600 PNG; dataviz, plotters and matplotlib on one core, PyVista on the GPU; a rotation frame is the camera turned and the image drawn again):

Chartdatavizdataviz GPUplottersmatplotlibPyVista
surface 60²6.34 ms2.37 ms6.05 ms57.0 ms93.7 ms
surface 200²29.9 ms5.41 ms21.3 ms146.2 ms101.0 ms
scatter 10,0002.81 ms2.00 ms3.19 ms96.3 ms89.2 ms
scatter 1,000,000147.0 ms39.9 ms170.3 ms5.71 s119.2 ms
line 100,000 (Lorenz)9.93 ms3.79 ms8.41 ms59.3 ms87.8 ms
molecule 1BNA (486 atoms)3.35 ms2.31 ms1.91 ms37.6 ms82.1 ms
rotation frame: surface 60²5.10 ms0.45 ms4.98 ms25.0 ms0.55 ms
rotation frame: molecule2.13 ms0.46 ms0.88 ms11.4 ms0.61 ms
GIF, 90 frames turning885.7 ms, 3949 KB665.9 ms, 3453 KB2.80 s, 4544 KB7.38 s, 5713 KB4.14 s, 3441 KB

What makes it fast: the scene is drawn straight into the output buffer by dataviz’s own anti-aliased rasterizer; dense lines become one pixel-column envelope and dense scatter plots an occupancy grid, so time and memory stay flat as the data grows; data passed to a series is not copied; glyphs and markers are cached as bitmaps; histograms use SIMD binning. Animations store only the changed part of each frame. On the web the same renderer compiled to WebAssembly draws a 960×520 live chart with 2 × 3 000 points in about 1.7 ms.

In 3D dataviz is 35–52× faster than matplotlib for scatter plots, 5–23× for surfaces and 4–9× for lines, molecules and rotation frames; it draws a turning GIF 3.2× faster than plotters and 7.4× faster than PyVista and is first (on the CPU or the GPU) for both surfaces and for scatter plots up to a million points, with lighting, depth order and anti-aliasing. plotters is faster for the long 3D line and the molecule: it draws 1-pixel lines and flat circles without depth sorting or lighting, while dataviz shades every atom as a lit sphere. PyVista (VTK) keeps the scene on the GPU and turns it in 0.6 ms per frame against dataviz’s 2–5 ms (still 200–500 frames per second), but needs 80–100 ms to save an image and about 280 MB of memory.

Where it is not first: for a tiny live chart (1 000 points) on a single thread plotters is 0.1–0.2 ms faster per frame; dataviz on all cores is the fastest there. The GPU backend needs the least CPU time but ~240 MB of driver memory and ~0.3 s to start, so the default stays on the CPU.