Skip to content
Back to search

dataviz

MarketplaceWorks with Claude CodeGitHub

Fast charts for Claude: 120+ chart types, CSV/JSON files and 3D molecules, drawn by dataviz (Rust) and returned as images.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 21 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/dataviz-rs/dataviz with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/dataviz-rs/dataviz'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/dataviz-rs--dataviz/badge.svg)](/listings/dataviz-rs--dataviz)

HTML

<a href="/listings/dataviz-rs--dataviz"><img src="/api/listings/dataviz-rs--dataviz/badge.svg" alt="findsafeskills safety rating" /></a>

Install

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

[dependencies]
dataviz = "1"
use dataviz::prelude::*;

fn main() -> Result<(), Error> {
    let x: Vec<f64> = (0..200).map(|i| i as f64 / 20.0).collect();

    let mut fig = Figure::new(900, 500);
    let ax = fig.axes();
    ax.title("Signals").x_label("time [s]").y_label("amplitude");
    ax.line(&x, x.iter().map(|t| t.sin())).label("sin");
    ax.line(&x, x.iter().map(|t| t.cos())).label("cos").dash(Dash::Dashed);
    ax.scatter([1.6, 4.7, 7.9], [1.0, -1.0, 1.0]).label("peaks").marker(Marker::Star).size(12.0);

    fig.save("signals.png")?;   // .svg .pdf .html .jpg .webp .bmp
    fig.show("Signals")?;       // interactive window
    Ok(())
}

Every chart type has a runnable example with code and output in [dataviz-examples](https://github.com/dataviz-rs/dataviz-examples) — see the [gallery](#gallery).

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 14 lines
  1. {
  2. "name": "dataviz",
  3. "owner": { "name": "dataviz-rs", "url": "https://github.com/dataviz-rs" },
  4. "description": "Fast charts for Claude: 120+ chart types, CSV/JSON files and 3D molecules, drawn by dataviz (Rust) and returned as images.",
  5. "plugins": [
  6. {
  7. "name": "dataviz",
  8. "source": "./claude-plugin",
  9. "description": "Charts from data, files and PDB structures, returned as images Claude can look at and refine.",
  10. "category": "data",
  11. "tags": ["charts", "plotting", "visualization", "data-science", "bioinformatics", "finance", "mcp"]
  12. }
  13. ]
  14. }
README.md · README · 752 lines
  1. # **DataViz** 🚀
  2. <a href="https://crates.io/crates/dataviz">
  3. <img style="display: inline!important" src="https://img.shields.io/crates/v/dataviz.svg"></img>
  4. </a>
  5. <a href="https://docs.rs/dataviz">
  6. <img style="display: inline!important" src="https://docs.rs/dataviz/badge.svg"></img>
  7. </a>
  8. <a href="https://docs.rs/dataviz">
  9. <img style="display: inline!important" src="https://img.shields.io/crates/d/dataviz"></img>
  10. </a>
  11. <a href="https://pypi.org/project/dataviz-rs/">
  12. <img style="display: inline!important" src="https://img.shields.io/pypi/v/dataviz-rs.svg"></img>
  13. </a>
  14. <a href="https://www.npmjs.com/package/dataviz-rs">
  15. <img style="display: inline!important" src="https://img.shields.io/npm/v/dataviz-rs.svg"></img>
  16. </a>
  17. <a href="https://github.com/dataviz-rs/dataviz/stargazers">
  18. <img style="display: inline!important" src="https://img.shields.io/github/stars/dataviz-rs/dataviz?style=social"></img>
  19. </a>
  20. <a href="https://github.com/dataviz-rs/dataviz/actions/workflows/rust.yml">
  21. <img style="display: inline!important" src="https://github.com/dataviz-rs/dataviz/actions/workflows/rust.yml/badge.svg"></img>
  22. </a>
  23. **Fast plotting for Rust, Python, JavaScript and C/C++: 120+ chart types,
  24. interactive windows, live data, 3D, maps and a grammar of graphics.
  25. Renders charts 8–50× faster than matplotlib in [these benchmarks](#performance)
  26. (with a much smaller API: see [differences](#differences-from-matplotlib)),
  27. and faster than the other Rust plotting libraries in nearly every
  28. measurement.**
  29. ```rust ignore
  30. let mut fig = Figure::new(900, 500);
  31. fig.axes().line(&x, &y).label("signal");
  32. fig.save("signal.png")?; // or fig.show() for a live, zoomable window
  33. ```
  34. ```python
  35. import dataviz.pyplot as plt # the common matplotlib calls, not all of them
  36. ```
  37. <table>
  38. <tr>
  39. <td width="33%"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-interactive/screenshots/interactive.gif" alt="Zoom, pan and range slider" width="100%"></td>
  40. <td width="33%"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-streaming/screenshots/streaming.gif" alt="Live dashboard" width="100%"></td>
  41. <td width="33%"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-animation/screenshots/animation.gif" alt="Animation" width="100%"></td>
  42. </tr>
  43. <tr>
  44. <td width="33%"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-maps/screenshots/maps.png" alt="Maps" width="100%"></td>
  45. <td width="33%"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-indicators/screenshots/indicators.png" alt="Finance" width="100%"></td>
  46. <td width="33%"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-math/screenshots/math.png" alt="Math notation" width="100%"></td>
  47. </tr>
  48. </table>
  49. **[Guide and chart catalog](https://dataviz-rs.github.io/dataviz/)** ·
  50. **[Live demo in the browser](https://dataviz-rs.github.io/dataviz/demo/)** ·
  51. [API docs](https://docs.rs/dataviz) · [Examples](https://github.com/dataviz-rs/dataviz-examples)
  52. *Built with heavy AI assistance (Claude Code); see [how it's made](#how-its-made).*
  53. ## Why dataviz
  54. - **Fast and lean.** Its own rasterizer draws straight into the output
  55. buffer: a 10-million-point line renders in about 0.1 s with a few MB of
  56. extra memory, a live chart redraws in 1–2 ms. 4–50× faster than
  57. matplotlib for typical charts (warm runs, imports excluded) (2× for a 100-million-value histogram,
  58. 78× for animations), and faster and lighter than plotters, ruviz, kuva and
  59. charts-rs in nearly every measurement ([numbers below](#performance)).
  60. Optional multi-core and GPU backends. An idle window uses no CPU (it
  61. only sends frames that changed).
  62. - **Everything in one crate.** 120+ chart types — lines, bars, statistics,
  63. heatmaps, contours, 3D, maps, sankey, networks — plus ready-made charts
  64. for **data scientists** (ROC/PR curves, confusion matrices, regression
  65. bands, density contours, dendrograms), **biologists and clinicians**
  66. (DNA sequence logos, gene tracks, Manhattan, volcano, clustermaps,
  67. single-cell UMAPs, dose-response, Kaplan-Meier, forest plots),
  68. **engineers** (FFT spectra, spectrograms, Bode, Nyquist, Smith charts)
  69. and **traders** (candlesticks,
  70. Ichimoku, VWAP, RSI, MACD, volume profile, order book depth, drawdown,
  71. Renko), with themes, subplots, shared and broken axes.
  72. - **Interactive and live.** `fig.show()` opens a window with zoom, pan, a
  73. crosshair with axis values, hover readouts, legend toggling, a range
  74. slider, measurement, selection and linked brushing across plots; `fig.show_live()` streams data with
  75. rolling windows and records it to CSV or a GIF.
  76. - **Every output.** PNG, SVG, PDF, JPEG, WebP, interactive HTML (one file,
  77. no internet needed: hover, zoom, pan, rotating 3D), animated GIF/PNG/WebP and MP4, the terminal, raw pixels
  78. for your own GUI, and the browser via WebAssembly.
  79. - **Text done right.** TeX math (`$\sigma^2 = \frac{1}{N}\sum x_i^2$`) in
  80. every label, any language (CJK, Arabic and Hebrew right to left, Hindi,
  81. Thai) and color emoji.
  82. - **Accessible.** Generated text descriptions for screen readers, color
  83. blindness simulation and warnings for colors that look alike.
  84. - **From any language.** Rust, Python (with a matplotlib-compatible
  85. `dataviz.pyplot` and an Altair-style `dv.plot`), JavaScript/npm (React,
  86. Svelte), C and C++ (CMake; prebuilt for Linux, macOS, Windows, iOS and
  87. Android), and Claude through the MCP server. A grammar of graphics (data,
  88. mark, encodings, facets) works in all of them.
  89. - **Pure Rust, few dependencies.** No Python, JavaScript, browser,
  90. Cairo or system fonts needed (a font is embedded); builds headless and
  91. for `wasm32`.
  92. ## Quick start
  93. ```toml
  94. [dependencies]
  95. dataviz = "1"
  96. ```
  97. ```rust no_run
  98. use dataviz::prelude::*;
  99. fn main() -> Result<(), Error> {
  100. let x: Vec<f64> = (0..200).map(|i| i as f64 / 20.0).collect();
  101. let mut fig = Figure::new(900, 500);
  102. let ax = fig.axes();
  103. ax.title("Signals").x_label("time [s]").y_label("amplitude");
  104. ax.line(&x, x.iter().map(|t| t.sin())).label("sin");
  105. ax.line(&x, x.iter().map(|t| t.cos())).label("cos").dash(Dash::Dashed);
  106. ax.scatter([1.6, 4.7, 7.9], [1.0, -1.0, 1.0]).label("peaks").marker(Marker::Star).size(12.0);
  107. fig.save("signals.png")?; // .svg .pdf .html .jpg .webp .bmp
  108. fig.show("Signals")?; // interactive window
  109. Ok(())
  110. }
  111. ```
  112. Every chart type has a runnable example with code and output in
  113. [dataviz-examples](https://github.com/dataviz-rs/dataviz-examples) — see
  114. the [gallery](#gallery).
  115. ## Your data, as it is
  116. Any iterable of numbers works — `Vec`, slices, ranges, iterators and arrays
  117. from other crates, without conversion or features:
  118. ```rust ignore
  119. ax.line(&x, &y); // Vec<f64>, &[f32], i64, …
  120. ax.line(&array1, &array1.mapv(f64::sin)); // ndarray
  121. ax.line(&times, polars_df.column("price")?.f64()?); // Polars (nulls become gaps)
  122. ax.scatter(arrow_x.values(), &arrow_y); // Arrow Float64Array
  123. let t = dataviz::plot::data::Table::read("data.csv")?; // CSV/TSV, quoted fields
  124. ax.line(t.time_column("date").unwrap(), t.column("close").unwrap());
  125. ```
  126. ## Features
  127. ### Interactive windows and live data
  128. ```rust ignore
  129. fig.show("title")?; // static data
  130. fig.show_live("title", 30, |fig| { /* push new points */ true })?;
  131. ```
  132. | Mouse / key | Action |
  133. |---|---|
  134. | wheel, drag, right-drag | zoom around the cursor, pan, zoom to a box |
  135. | crosshair (`C`) | cursor values on the axes and every series' value at that x; linked across plots sharing x |
  136. | hover (`H`) | nearest data point |
  137. | click a legend row | hide or show the series |
  138. | range slider | drag to pan, drag its edges to zoom |
  139. | Shift+drag / Ctrl+drag | measure Δx, Δy and % / select a box (`fig.selection()`) |
  140. | `A`, `R` | auto scale y to the visible data, follow live data again |
  141. | `S`, Shift+S, Ctrl+C, `V` | save PNG, SVG/PDF, copy to the clipboard, record a GIF |
  142. | 3D: drag, wheel, `X`/`Y`/`Z` | turn the scene, zoom, rotate 15° around that axis (Shift = reverse) |
  143. | `T`, `L`, `F`, Backspace | draw a trend line, a price level, a Fibonacci retracement; take back the last drawing |
  144. Live charts keep the view you zoomed to while data arrives (y follows the
  145. visible data), stream with `Line::push` / `keep_last` / `keep_since`, and
  146. `plot::data::CsvLog` records the stream to CSV. The same zoom, pan, hover
  147. and click work in your own GUI or web page through
  148. `fig.zoom_at`, `pan_by`, `hover`, `click` ([egui](https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-egui),
  149. [WebAssembly](https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-wasm)).
  150. ### Grammar of graphics
  151. Charts can also be described the way Vega-Lite, ggplot2 and Altair do it:
  152. data, a mark (point, line, area, bar, rect, boxplot) and encodings. The
  153. color groups, legends, aggregation, histograms, stacking and small
  154. multiples follow from the encodings. This works from Rust, from JSON
  155. specs, from Python, JavaScript and C, and through the MCP server:
  156. ```rust ignore
  157. use dataviz::plot::grammar::{Chart, Data, Field, Aggregate, Mark};
  158. let data = Data::new().text("species", &species).num("mass", &mass).text("island", &island);
  159. Chart::new(data, Mark::Bar)
  160. .x("island")
  161. .y(Field::new("mass").aggregate(Aggregate::Mean))
  162. .color("species")
  163. .draw(&mut fig)?;
  164. ```
  165. ```json
  166. {"data": [{"species": "Adelie", "mass": 3750, "island": "Biscoe"}, …],
  167. "mark": "point", "encoding": {"x": "flipper", "y": "mass", "color": "species", "facet": "island"}}
  168. ```
  169. ### Chart types
  170. | Category | Charts |
  171. |---|---|
  172. | Lines & areas | line, step, smooth spline, area, fill-between, stacked / 100 % area, streamgraph, horizon chart, function plot, sparkline |
  173. | Points | scatter, colormapped scatter, bubble |
  174. | Bars | vertical, horizontal, grouped, stacked, percent, overlay, value labels, waterfall, Gantt, lollipop, bullet, dumbbell, Pareto |
  175. | Distributions | histogram (bin rules, density, cumulative, step), KDE, ECDF, box (notches), violin, raincloud, strip, swarm, ridgeline, Q-Q, 2D histogram, hexbin |
  176. | Uncertainty & fits | error bars, error bands, polynomial regression with R², moving averages |
  177. | Machine learning | ROC curve (AUC), precision-recall curve, confusion matrix, SHAP summary, calibration curve, learning curve, cumulative gain and lift, regression with confidence band, LOESS, 2D density contours, dendrogram, UpSet plot |
  178. | Biology & medicine | 3D DNA double helix, molecules from PDB/XYZ (ball-and-stick, sticks, space-filling, backbone, cartoon), Ramachandran plot, isosurfaces of volumes, 3D cells and organoids, 3D UMAP, Circos, Hi-C contact map, coverage track, phylogenetic trees (Newick; rectangular, circular), oncoprint, mutation lollipop, DNA/protein sequence logo, gene track, Manhattan plot, p-value Q-Q, volcano plot, MA plot, clustermap, single-cell embedding (UMAP/t-SNE), dose-response (IC50), Kaplan-Meier survival, forest plot |
  179. | Signals & control | FFT spectrum, spectrogram, 3D waterfall, Bode plot, Nyquist plot, Smith chart, streamlines, SPC control chart |
  180. | Finance & trading | candlestick, OHLC, Heikin-Ashi, Renko, footprint (order flow), market profile (TPO), liquidity heatmap, option payoff (Black–Scholes), implied volatility surface, Bollinger bands, Ichimoku cloud, VWAP, RSI, MACD, Stochastic, ATR, volume profile, order book depth, drawdown, trading-day axis |
  181. | Grids & fields | heatmap, correlation matrix, calendar heatmap, image, contour lines and fills, quiver |
  182. | 3D | surface, wireframe, scatter, line, spheres, meshes, ellipsoids, isosurfaces, vectors, bars, text; one shared scene per plot with depth sorting, lighting, perspective and free rotation around x, y and z |
  183. | Maps | built-in world map and the states/provinces of every country, choropleth by ISO code or name, points, great-circle routes and flow maps, hexbin density maps, web-map tile basemaps (OpenStreetMap), GeoJSON shapes; Robinson, Natural Earth, Equal Earth, Mollweide, equirectangular, Mercator, orthographic globe, Albers and Lambert conic, stereographic, azimuthal equal-area |
  184. | Parts of a whole | pie, donut, treemap, sunburst, waffle, marimekko (mosaic), funnel, gauge |
  185. | Polar | polar line/scatter, radar, rose / wind rose |
  186. | Relations & flows | sankey, chord diagram, network graph (force-directed), parallel coordinates, slope chart, bump chart, ternary diagram |
  187. | Layouts | subplots with spans, shared axes, broken axes, secondary y-axis, facets (small multiples), pair plot, aligned panels |
  188. | Annotations | text, arrows, reference lines, shaded spans, rectangles |
  189. ### For data scientists
  190. ```rust ignore
  191. ax.roc_curve("gradient boosting", &labels, &scores); // legend shows the AUC
  192. ax.pr_curve("gradient boosting", &labels, &scores); // and the average precision
  193. ax.confusion_matrix(["cat", "dog", "bird"], &actual, &predicted, true);
  194. ax.regplot(&x, &y); // fit, 95 % band and R²
  195. ax.density_contour(&x, &y); // 2D KDE, millions of points
  196. ax.dendrogram(&names, &features); // hierarchical clustering
  197. ax.shap_summary(&features, &shap, &values, 10); // what drives the model
  198. ax.calibration_curve("model", &labels, &probs, 10); // Brier score in the legend
  199. ax.learning_curve(&sizes, &train, &validation);
  200. ax.gain_curve("model", &labels, &scores); // and lift_curve
  201. ax.raincloud([("A", &a), ("B", &b)]);
  202. ax.upset(&sets, 12); // set intersections
  203. ```
  204. ### For biologists and clinicians
  205. ```rust ignore
  206. ax.sequence_logo(&aligned_sequences); // DNA, RNA or protein motif
  207. ax.gene_track(&genes); // exons, introns, strand
  208. ax.manhattan(&chromosome, &position, &p_values); // GWAS
  209. ax.volcano(&genes, &log2_fc, &p_values, 1.0, 1e-3, 10); // top 10 genes named
  210. fig.clustermap(&genes, &samples, &expression); // clustered heatmap
  211. ax.embedding(&umap_x, &umap_y, &cell_types); // single-cell clusters
  212. ax.dose_response(&concentration, &viability); // 4PL fit and IC50
  213. ax.kaplan_meier([("control", t1, e1), ("treated", t2, e2)]); // log-rank p
  214. ax.forest_plot(&studies, &hr, &low, &high, 1.0); // meta-analysis
  215. ax.circos(&chromosomes).track(&chr, &pos, &cn).links(&sv);
  216. ax.hic(matrix, start, bin).domains(&tads); // contact map as a triangle
  217. ax.coverage(&pos, &depth).min_depth(20.0);
  218. ax.phylo_tree(newick); // or phylo_tree_circular
  219. ax.oncoprint(&genes, samples, &alterations);
  220. ax.mutation_lollipop(393.0, &domains, &mutations);
  221. ax.molecule(Molecule::from_pdb(&pdb)).style(MolStyle::Cartoon);
  222. ax.ramachandran(&phi, &psi); // from molecule.phi_psi()
  223. ax.isosurface(&volume, [nx, ny, nz], bounds, level); // microscopy, CT, densities
  224. ```
  225. ### 3D: rotate around x, y and z
  226. <img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-biology-3d/screenshots/rotate.gif" alt="DNA and a cell turning around the z, x and y axes" width="100%">
  227. ```rust ignore
  228. ax.dna_helix("ATGCGTATAAAAGCC").highlight(5..11, "#ffd400", Some("TATA box"));
  229. ax.molecule(Molecule::from_pdb(&pdb)).style(MolStyle::Backbone).coloring(MolColor::Rainbow);
  230. ax.ellipsoid([0.0, 0.0, 0.0], [10.0, 8.0, 6.0]).opacity(0.16); // a cell membrane
  231. ax.spheres3d(&x, &y, &z, [1.0]).values(&expression, Colormap::Viridis);
  232. ax.embedding3d(&umap1, &umap2, &umap3, &cell_types);
  233. ax.surface_fn(|x, y| (x * y).sin(), (-3.0, 3.0), (-3.0, 3.0), 60);
  234. ax.rotate(Axis3::X, 30.0).roll(10.0).perspective(0.4); // or ax.camera(azimuth, elevation)
  235. ```
  236. All 3D series of a plot share one scene, sorted by depth, lit from the
  237. upper left and optionally faded with distance (`depth_cue`). The camera is
  238. a rotation matrix, so it turns freely around any axis. In a window: drag
  239. to turn, wheel to zoom, `X`/`Y`/`Z` rotate by 15° (Shift+key the other
  240. way), `R` resets, hover names the atom, base pair or point. A frame of the
  241. 1BNA DNA structure (486 atoms, ball-and-stick, shaded) takes about 8 ms on
  242. one core, a 10 000-point 3D scatter 3 ms; a turning 90-frame GIF of a
  243. surface 0.9 s (3D benchmarks in the Performance section).
  244. ### For engineers
  245. ```rust ignore
  246. use dataviz::plot::series::signal::{freq_response, logspace};
  247. ax.spectrum(&signal, 8000.0); // FFT amplitude spectrum
  248. ax.spectrogram(&signal, 8000.0, 512, 64); // STFT power in dB
  249. let w = logspace(0.01, 100.0, 400);
  250. fig.bode("plant", &w, &freq_response(&[1.0], &[1.0, 0.4, 1.0], &w));
  251. ax.nyquist(&freq_response(&[1.0], &[1.0, 0.4, 1.0], &w));
  252. ax.smith(&impedances); // normalized z on a Smith chart
  253. ax.streamplot(|x, y| (u(x, y), v(x, y)), (-3.0, 3.0), (-2.0, 2.0), 28);
  254. ax.ternary(&a, &b, &c).names("sand", "silt", "clay");
  255. ax.waterfall3d(&freq, &time, spectra);
  256. ax.control_chart(&measurements); // ±3σ, Western Electric rules
  257. ax.pareto(&causes, &counts);
  258. ax.quiver3d(points, vectors);
  259. ```
  260. ### For traders
  261. ```rust ignore
  262. let x = ax.trading_axis(&times, "%d %b"); // no weekend gaps
  263. ax.candlestick(&x, &open, &high, &low, &close);
  264. ax.ichimoku(&x, &high, &low, &close);
  265. ax.vwap(&x, &high, &low, &close, &volume);
  266. profile.volume_profile(&close, &volume, 24); // POC and value area
  267. osc.stochastic(&x, &high, &low, &close, 14, 3);
  268. book.depth_chart(&bids, &asks);
  269. dd.drawdown(&x, &equity); // max drawdown in the legend
  270. heat.liquidity_heatmap((t0, t1), (p0, p1), &depth); // order book over time
  271. of.footprint(bars, 0.25); // bid × ask per level
  272. tpo.market_profile(&ranges, 1.0); // POC and value area
  273. opt.option_payoff(&legs, (80.0, 120.0), 30.0, 0.22, 0.03);
  274. vol.volatility_surface(&strikes, &maturities, &iv);
  275. ```
  276. ### Business and editorial
  277. ```rust ignore
  278. ax.bullet(&kpis, &values, &targets, &ranges);
  279. ax.dumbbell(&names, &before, &after);
  280. ax.slope(&names, &before, &after, "2020", "2025");
  281. ax.bump(&teams, &seasons, &ranks);
  282. ax.waffle(&parts, &shares);
  283. ax.marimekko(&columns, &rows, &values);
  284. ax.chord(&groups, &flows);
  285. ax.streamgraph(&x, &layers);
  286. ax.horizon(&x, &rows);
  287. ```
  288. ### Statistics and finance
  289. ```rust ignore
  290. ax.violin([("A", &a), ("B", &b)]);
  291. ax.swarm([("A", &a), ("B", &b)]);
  292. ax.ridgeline(months); // (name, values) per row
  293. ax.qq(&values); // against the normal distribution
  294. ax.regression(&x, &y, 2); // label shows the equation and R²
  295. fig.facet_wrap(groups, 3, |ax, data| { ax.line(&t, data); });
  296. fig.pair_plot([("length", &l), ("weight", &w), ("age", &a)]);
  297. ax.candlestick(&t, &open, &high, &low, &close);
  298. ax.bollinger(&t, &close, 20, 2.0);
  299. rsi_panel.rsi(&t, &close, 14);
  300. macd_panel.macd(&t, &close, 12, 26, 9);
  301. ```
  302. ### Maps
  303. ```rust ignore
  304. use dataviz::plot::geo::Projection;
  305. ax.map(Projection::Robinson);
  306. ax.choropleth([("DEU", 83.2), ("TUR", 85.3), ("JP", 124.5), ("Brazil", 203.1)])
  307. .colorbar("population [M]");
  308. ax.geo_line([28.98, -74.0], [41.01, 40.7]); // great circle Istanbul → New York
  309. ax.region_map("TUR", [("TR-34", 15.7), ("Ankara", 5.8)]); // states/provinces (feature `regions`)
  310. ax.geo_flows(&flows, &names); // flow map, width by value
  311. ax.geo_hexbin(&lon, &lat); // density of millions of points
  312. ax.basemap(lon, lat, 12, tile_dir("tiles"), "© OpenStreetMap contributors");
  313. ```
  314. Country outlines with ISO codes, continent, population and GDP are
  315. included (Natural Earth, public domain); `geo::read_geojson` reads other
  316. shapes.
  317. ### Text: math and any language
  318. ```rust ignore
  319. ax.y_label(r"$\sigma^2$ [$\mathrm{m^2\,s^{-2}}$]");
  320. ax.text(1.0, 2.0, r"$\int_0^\infty e^{-x^2}\,dx = \frac{\sqrt{\pi}}{2}$");
  321. fig.title("Ventes · 全球销售 · المبيعات · 🚀");
  322. ```
  323. TeX math (scripts, fractions, roots, Greek letters, operators, accents) is
  324. typeset in PNG, SVG, PDF and on the GPU alike. Characters missing from the
  325. embedded font come from system fonts; right-to-left text is reordered and
  326. shaped; color emoji are drawn.
  327. ### Output
  328. ```rust ignore
  329. fig.save("chart.png")?; // also .svg .pdf .jpg .webp .bmp
  330. fig.save("chart.html")?; // interactive page; 3D plots turn with the mouse
  331. fig.record("wave.gif", 30.0, 120, |fig, i| { /* change the figure */ })?; // .gif .png (APNG) .mp4 .webm
  332. fig.print()?; // terminal (colored half blocks or Braille)
  333. fig.render_into(&mut pixels)?; // RGBA pixels for your own window or texture
  334. ```
  335. ### Accessibility
  336. ```rust ignore
  337. let text = fig.alt_text(); // "Sales. Line chart; quarter from …; Series: north (3 to 5); …"
  338. for w in fig.color_warnings() { println!("{w}"); } // e.g. two series look alike with deuteranopia
  339. pixels.simulate(Cvd::Deuteranopia); // see the chart as people with color blindness do
  340. ```
  341. SVG, PDF and HTML output carry the title and description for screen
  342. readers.
  343. ### Backends
  344. ```rust ignore
  345. fig.backend(Backend::Auto); // default: CPU, all cores from 1 megapixel on
  346. fig.backend(Backend::Cpu { threads: 1 }); // least CPU time and memory
  347. fig.backend(Backend::Cpu { threads: 0 }); // all cores: lowest latency without a GPU
  348. fig.backend(Backend::Gpu); // `gpu` feature: Vulkan / Metal / DX12 / OpenGL
  349. ```
  350. ## Performance
  351. 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](https://github.com/dataviz-rs/dataviz-examples/tree/main/benchmarks).
  352. > **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.
  353. **Charts to an 800×600 PNG** (one thread, time per chart):
  354. | Chart | dataviz | plotters | ruviz | kuva | charts-rs | matplotlib |
  355. |---|---:|---:|---:|---:|---:|---:|
  356. | line, 1 000 points | **1.50 ms** | 1.66 ms | 3.60 ms | 4.98 ms | 11.1 ms | 29.3 ms |
  357. | bar, 20 bars | **0.79 ms** | 0.83 ms | 3.90 ms | 3.55 ms | 2.08 ms | 41.8 ms |
  358. | scatter, 10 000 points | **2.12 ms** | 2.83 ms | 4.37 ms | 8.53 ms | 76.2 ms | 37.5 ms |
  359. | scatter, 100 000 points | **9.88 ms** | 16.6 ms | 16.9 ms | 17.4 ms | 784.5 ms | 81.8 ms |
  360. | line, 100 000 points | **2.17 ms** | 5.91 ms | 8.39 ms | 28.2 ms | 829.7 ms | 50.2 ms |
  361. | histogram, 1 M values | **2.06 ms** | 2.76 ms | 30.2 ms | 16.1 ms | 12.8 ms | 49.6 ms |
  362. **Big data** (time / memory above the data itself):
  363. | Chart | dataviz | dataviz all cores | plotters | ruviz | kuva | charts-rs | matplotlib |
  364. |---|---:|---:|---:|---:|---:|---:|---:|
  365. | line, 10 M points | 129.0 ms / +7 MB | **103.1 ms / +6 MB** | 481.9 ms / +315 MB | 332.5 ms / +389 MB | 2.70 s / +787 MB | fails | 533.1 ms / +1162 MB |
  366. | scatter, 10 M points | 230.3 ms / +8 MB | **181.6 ms / +7 MB** | 1.53 s / +12 MB | 1.23 s / +376 MB | 1.56 s / +788 MB | fails | 5.08 s / +910 MB |
  367. | histogram, 100 M values | 243.5 ms / +7 MB | **235.2 ms / +6 MB** | 264.6 ms / +12 MB | 3.64 s / +1915 MB | 1.64 s / +1551 MB | 1.23 s / +1533 MB | 516.6 ms / +13 MB |
  368. **Live chart** (rolling window, one new point and a full redraw per frame; latency p50 / CPU per frame / memory of the process):
  369. | Window | dataviz 1 thread | dataviz all cores | dataviz GPU | plotters | ruviz | kuva | matplotlib |
  370. |---|---:|---:|---:|---:|---:|---:|---:|
  371. | 1 000 points, 800×600 | 0.77 ms / 0.77 ms / 7 MB | **0.49 ms / 2.57 ms / 8 MB** | 0.67 ms / 0.47 ms / 214 MB | 0.65 ms / 0.63 ms / 14 MB | 4.66 ms / 4.67 ms / 11 MB | 5.26 ms / 5.23 ms / 27 MB | 10.1 ms / 10.1 ms / 73 MB |
  372. | 100 000 points, 800×600 | 2.20 ms / 2.17 ms / 12 MB | **2.02 ms / 4.67 ms / 13 MB** | 2.04 ms / 1.63 ms / 219 MB | 5.40 ms / 5.37 ms / 16 MB | 34.6 ms / 34.6 ms / 17 MB | 47.0 ms / 47.1 ms / 36 MB | 62.0 ms / 62.0 ms / 112 MB |
  373. | 1 000 points, 1920×1080 | 1.69 ms / 1.70 ms / 15 MB | **0.77 ms / 5.83 ms / 17 MB** | 1.39 ms / 1.23 ms / 221 MB | 1.48 ms / 1.50 ms / 18 MB | 17.4 ms / 17.4 ms / 18 MB | 18.0 ms / 18.0 ms / 33 MB | 12.4 ms / 12.6 ms / 79 MB |
  374. | 100 000 points, 1920×1080 | 5.51 ms / 5.53 ms / 18 MB | 3.25 ms / 14.1 ms / 20 MB | **2.70 ms / 2.53 ms / 225 MB** | 8.43 ms / 8.43 ms / 21 MB | 119.9 ms / 119.9 ms / 28 MB | 115.8 ms / 115.8 ms / 42 MB | 136.8 ms / 136.8 ms / 177 MB |
  375. **Animated GIF** (800×600, 120 frames; time, file size):
  376. | Animation | dataviz | plotters | ruviz | matplotlib |
  377. |---|---:|---:|---:|---:|
  378. | whole plot moves | **282.0 ms, 1001 KB** | 1.09 s, 3227 KB | 3.00 s, 1741 KB | 5.24 s, 1119 KB |
  379. | line grows on fixed axes | **81.0 ms, 38 KB** | 2.40 s, 3257 KB | 2.91 s, 1701 KB | 5.75 s, 420 KB |
  380. **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):
  381. | Chart | dataviz | dataviz GPU | plotters | matplotlib | PyVista |
  382. |---|---:|---:|---:|---:|---:|
  383. | surface 60² | 6.34 ms | **2.37 ms** | 6.05 ms | 57.0 ms | 93.7 ms |
  384. | surface 200² | 29.9 ms | **5.41 ms** | 21.3 ms | 146.2 ms | 101.0 ms |
  385. | scatter 10,000 | 2.81 ms | **2.00 ms** | 3.19 ms | 96.3 ms | 89.2 ms |
  386. | scatter 1,000,000 | 147.0 ms | **39.9 ms** | 170.3 ms | 5.71 s | 119.2 ms |
  387. | line 100,000 (Lorenz) | 9.93 ms | **3.79 ms** | 8.41 ms | 59.3 ms | 87.8 ms |
  388. | molecule 1BNA (486 atoms) | 3.35 ms | 2.31 ms | **1.91 ms** | 37.6 ms | 82.1 ms |
  389. | rotation frame: surface 60² | 5.10 ms | **0.45 ms** | 4.98 ms | 25.0 ms | 0.55 ms |
  390. | rotation frame: molecule | 2.13 ms | **0.46 ms** | 0.88 ms | 11.4 ms | 0.61 ms |
  391. | GIF, 90 frames turning | 885.7 ms, 3949 KB | **665.9 ms, 3453 KB** | 2.80 s, 4544 KB | 7.38 s, 5713 KB | 4.14 s, 3441 KB |
  392. What makes it fast: the scene is drawn straight into the output buffer by
  393. dataviz's own anti-aliased rasterizer; dense lines become one pixel-column
  394. envelope and dense scatter plots an occupancy grid, so time and memory stay
  395. flat as the data grows; data passed to a series is not copied; glyphs and
  396. markers are cached as bitmaps; histograms use SIMD binning. Animations store
  397. only the changed part of each frame. On the web the same renderer compiled to
  398. WebAssembly draws a 960×520 live chart with 2 × 3 000 points in about 1.7 ms.
  399. In 3D dataviz is 35–52× faster than matplotlib for scatter plots, 5–23×
  400. for surfaces and 4–9× for lines, molecules and rotation frames; it draws
  401. a turning GIF 3.2× faster than plotters and 7.4× faster than PyVista and
  402. is first (on the CPU or the GPU) for both surfaces and for scatter plots
  403. up to a million points, with lighting, depth order and anti-aliasing.
  404. plotters is faster for the long 3D line and the molecule: it draws
  405. 1-pixel lines and flat circles without depth sorting or lighting, while
  406. dataviz shades every atom as a lit sphere. PyVista (VTK) keeps the scene
  407. on the GPU and turns it in 0.6 ms per frame against dataviz's 2–5 ms
  408. (still 200–500 frames per second), but needs 80–100 ms to save an image
  409. and about 280 MB of memory.
  410. Where it is not first: for a tiny live chart (1 000 points) on a single
  411. thread plotters is 0.1–0.2 ms faster per frame; dataviz on all cores is
  412. the fastest there. The GPU backend needs the least CPU time but ~240 MB of
  413. driver memory and ~0.3 s to start, so the default stays on the CPU.
  414. ### Beyond Rust plotting libraries
  415. Each of these was measured on the same machine, against the most common
  416. tool for the job:
  417. | Task | dataviz | Compared with |
  418. |---|---:|---:|
  419. | Density image of 100 M points (Datashader style), Rust / Python | **70 ms / 81 ms** | Datashader 372 ms |
  420. | Density image of 10 M points, Python | **39 ms** | Datashader 73 ms |
  421. | 4-panel script through `dataviz.pyplot` (lines, scatter, log histogram, bars) | **3.3 ms** | matplotlib 94 ms |
  422. | 1 M point line through `dataviz.pyplot` | **17 ms** | matplotlib 190 ms |
  423. | 10 M rows from Polars / pyarrow into a chart | **59 ms** | 508 ms / 2.86 s via NumPy |
  424. | 1 M point chart built in JavaScript (npm, Float64Array) | **3 ms** | 214 ms in 0.18 (JSON) |
  425. | 1 M point chart built in C/C++ with binary arrays | **4–7 ms** | 166 ms through JSON text |
  426. | 3D point cloud, 1 M colormapped points, CPU | **73 ms** | 3.3 s in 0.18 |
  427. | Idle chart window, CPU use | **0.5 %** | 7 % in 0.18 |
  428. The `pyplot` rows are the median of warm runs in one process, with the
  429. imports excluded and both libraries saving the same PNG
  430. ([script](https://github.com/dataviz-rs/dataviz-examples/blob/main/benchmarks/pyplot_bench.py)). The first call costs more: 7 ms against matplotlib's
  431. 326 ms, and the imports take about 60 ms against 230 ms. matplotlib does
  432. far more than these scripts use, so these numbers compare the common
  433. case, not the whole library.
  434. ## Gallery
  435. Every image links to its example in
  436. [dataviz-examples](https://github.com/dataviz-rs/dataviz-examples) (code,
  437. `cargo run`, output).
  438. ### Live, interactive and animated
  439. <table>
  440. <tr><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-interactive"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-interactive/screenshots/interactive.gif" alt="Zoom, pan and range slider" width="100%"><br><sub>Zoom, pan and range slider</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-streaming"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-streaming/screenshots/streaming.gif" alt="Live dashboard (streaming data)" width="100%"><br><sub>Live dashboard (streaming data)</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-animation"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-animation/screenshots/animation.gif" alt="Animations (GIF, APNG, WebP, MP4)" width="100%"><br><sub>Animations (GIF, APNG, WebP, MP4)</sub></a></td></tr>
  441. <tr><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-binance"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-binance/screenshots/binance.png" alt="Live Binance BTC dashboard" width="100%"><br><sub>Live Binance BTC dashboard</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-html"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-html/screenshots/html.png" alt="Interactive HTML (hover, crosshair)" width="100%"><br><sub>Interactive HTML (hover, crosshair)</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-wasm"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-wasm/screenshots/wasm.png" alt="In the browser (WebAssembly)" width="100%"><br><sub>In the browser (WebAssembly)</sub></a></td></tr>
  442. <tr><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-egui"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-egui/screenshots/egui.png" alt="Inside an egui app" width="100%"><br><sub>Inside an egui app</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-backends"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-backends/screenshots/backends.png" alt="CPU, multi-core and GPU backends" width="100%"><br><sub>CPU, multi-core and GPU backends</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-terminal"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-terminal/screenshots/terminal.png" alt="Charts in the terminal" width="100%"><br><sub>Charts in the terminal</sub></a></td></tr>
  443. <tr><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-c-cpp"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-c-cpp/screenshots/dashboard.png" alt="From C and C++ (CMake)" width="100%"><br><sub>From C and C++ (CMake)</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-grammar"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-grammar/screenshots/grammar.png" alt="Grammar of graphics (data + mark + encodings)" width="100%"><br><sub>Grammar of graphics (data + mark + encodings)</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-grammar"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-grammar/screenshots/grammar_facets.png" alt="Grammar of graphics: facets" width="100%"><br><sub>Grammar of graphics: facets</sub></a></td></tr>
  444. </table>
  445. ### For data scientists, biologists, engineers and traders
  446. <table>
  447. <tr><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-data-science"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-data-science/screenshots/data_science.png" alt="Data science: ROC, confusion matrix, regression" width="100%"><br><sub>Data science: ROC, confusion matrix, regression</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-data-science"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-data-science/screenshots/evaluation.png" alt="Models: SHAP, calibration, learning curve, UpSet" width="100%"><br><sub>Models: SHAP, calibration, learning curve, UpSet</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-biology"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-biology/screenshots/biology.png" alt="Biology: DNA logo, GWAS, volcano, UMAP, survival" width="100%"><br><sub>Biology: DNA logo, GWAS, volcano, UMAP, survival</sub></a></td></tr>
  448. <tr><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-biology"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-biology/screenshots/clustermap.png" alt="Clustermap of gene expression" width="100%"><br><sub>Clustermap of gene expression</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-biology"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-biology/screenshots/genomics.png" alt="Genomics: Circos, Hi-C, trees, oncoprint" width="100%"><br><sub>Genomics: Circos, Hi-C, trees, oncoprint</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-biology-3d"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-biology-3d/screenshots/rotate.gif" alt="3D DNA and cell turning around x, y, z" width="100%"><br><sub>3D DNA and cell turning around x, y, z</sub></a></td></tr>
  449. <tr><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-biology-3d"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-biology-3d/screenshots/biology_3d.png" alt="3D: DNA, PDB molecules, cell, organoid, UMAP" width="100%"><br><sub>3D: DNA, PDB molecules, cell, organoid, UMAP</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-biology-3d"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-biology-3d/screenshots/protein.png" alt="Protein cartoons, Ramachandran, isosurfaces" width="100%"><br><sub>Protein cartoons, Ramachandran, isosurfaces</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-engineering"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-engineering/screenshots/engineering.png" alt="Engineering: spectrum, spectrogram, Nyquist, Smith" width="100%"><br><sub>Engineering: spectrum, spectrogram, Nyquist, Smith</sub></a></td></tr>
  450. <tr><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-engineering"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-engineering/screenshots/bode.png" alt="Bode plot" width="100%"><br><sub>Bode plot</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-engineering"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-engineering/screenshots/science.png" alt="Streamlines, ternary, SPC, Pareto, 3D waterfall" width="100%"><br><sub>Streamlines, ternary, SPC, Pareto, 3D waterfall</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-trading"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-trading/screenshots/trading.png" alt="Trading: Ichimoku, VWAP, volume profile, depth" width="100%"><br><sub>Trading: Ichimoku, VWAP, volume profile, depth</sub></a></td></tr>
  451. <tr><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-trading"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-trading/screenshots/orderflow.png" alt="Order flow: liquidity, footprint, TPO, options" width="100%"><br><sub>Order flow: liquidity, footprint, TPO, options</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-drawing-tools"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-drawing-tools/screenshots/drawing_tools.png" alt="Drawing tools: trend lines, levels, Fibonacci" width="100%"><br><sub>Drawing tools: trend lines, levels, Fibonacci</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-volume-files"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-volume-files/screenshots/volume_files.png" alt="NIfTI and DICOM scans, lit volume rendering" width="100%"><br><sub>NIfTI and DICOM scans, lit volume rendering</sub></a></td></tr>
  452. <tr><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-business"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-business/screenshots/business.png" alt="Business: bullet, slope, chord, streamgraph" width="100%"><br><sub>Business: bullet, slope, chord, streamgraph</sub></a></td></tr>
  453. </table>
  454. ### Lines, points and bars
  455. <table>
  456. <tr><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-line"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-line/screenshots/line.png" alt="Line styles" width="100%"><br><sub>Line styles</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-markers-steps-smooth"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-markers-steps-smooth/screenshots/markers_steps_smooth.png" alt="Markers, steps and smoothing" width="100%"><br><sub>Markers, steps and smoothing</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-area-fill"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-area-fill/screenshots/area_fill.png" alt="Area and fill between" width="100%"><br><sub>Area and fill between</sub></a></td></tr>
  457. <tr><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-stacked-area"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-stacked-area/screenshots/stacked_area.png" alt="Stacked areas" width="100%"><br><sub>Stacked areas</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-scatter-bubble"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-scatter-bubble/screenshots/scatter_bubble.png" alt="Scatter and bubble charts" width="100%"><br><sub>Scatter and bubble charts</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-bars"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-bars/screenshots/bars.png" alt="Bar charts" width="100%"><br><sub>Bar charts</sub></a></td></tr>
  458. <tr><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-stem-waterfall"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-stem-waterfall/screenshots/stem_waterfall.png" alt="Stem and waterfall charts" width="100%"><br><sub>Stem and waterfall charts</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-errorbars-band"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-errorbars-band/screenshots/errorbars_band.png" alt="Error bars and confidence bands" width="100%"><br><sub>Error bars and confidence bands</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-quiver-function"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-quiver-function/screenshots/quiver_function.png" alt="Vector field and function plots" width="100%"><br><sub>Vector field and function plots</sub></a></td></tr>
  459. </table>
  460. ### Statistics
  461. <table>
  462. <tr><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-histograms"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-histograms/screenshots/histograms.png" alt="Histograms, KDE and ECDF" width="100%"><br><sub>Histograms, KDE and ECDF</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-box-violin"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-box-violin/screenshots/box_violin.png" alt="Box and violin plots" width="100%"><br><sub>Box and violin plots</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-distributions"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-distributions/screenshots/distributions.png" alt="Strip, swarm, ridgeline, Q-Q" width="100%"><br><sub>Strip, swarm, ridgeline, Q-Q</sub></a></td></tr>
  463. <tr><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-facets"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-facets/screenshots/facets.png" alt="Facets (small multiples)" width="100%"><br><sub>Facets (small multiples)</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-facets"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-facets/screenshots/pair_plot.png" alt="Pair plot (scatter matrix)" width="100%"><br><sub>Pair plot (scatter matrix)</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-hist2d-hexbin"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-hist2d-hexbin/screenshots/hist2d_hexbin.png" alt="2D histogram and hexbin" width="100%"><br><sub>2D histogram and hexbin</sub></a></td></tr>
  464. </table>
  465. ### Finance and time
  466. <table>
  467. <tr><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-candlestick"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-candlestick/screenshots/candlestick.png" alt="Candlestick chart" width="100%"><br><sub>Candlestick chart</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-indicators"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-indicators/screenshots/indicators.png" alt="Bollinger, RSI, MACD" width="100%"><br><sub>Bollinger, RSI, MACD</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-indicators"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-indicators/screenshots/heikin_ashi.png" alt="Heikin-Ashi candles" width="100%"><br><sub>Heikin-Ashi candles</sub></a></td></tr>
  468. <tr><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-time-series"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-time-series/screenshots/time_series.png" alt="Time series" width="100%"><br><sub>Time series</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-gantt"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-gantt/screenshots/gantt.png" alt="Gantt chart" width="100%"><br><sub>Gantt chart</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-parallel-calendar"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-parallel-calendar/screenshots/parallel_calendar.png" alt="Parallel coordinates and calendar" width="100%"><br><sub>Parallel coordinates and calendar</sub></a></td></tr>
  469. </table>
  470. ### Grids, fields and 3D
  471. <table>
  472. <tr><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-heatmap"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-heatmap/screenshots/heatmap.png" alt="Heatmap (correlation matrix)" width="100%"><br><sub>Heatmap (correlation matrix)</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-contour"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-contour/screenshots/contour.png" alt="Contour plots" width="100%"><br><sub>Contour plots</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-image"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-image/screenshots/image.png" alt="Images" width="100%"><br><sub>Images</sub></a></td></tr>
  473. <tr><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-three-d"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-three-d/screenshots/three_d.png" alt="3D surface, Lorenz attractor, mesh" width="100%"><br><sub>3D surface, Lorenz attractor, mesh</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-three-d"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-three-d/screenshots/volume.png" alt="Volume rendering, maximum intensity" width="100%"><br><sub>Volume rendering, maximum intensity</sub></a></td></tr>
  474. </table>
  475. ### Maps
  476. <table>
  477. <tr><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-maps"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-maps/screenshots/maps.png" alt="Choropleth and flight routes" width="100%"><br><sub>Choropleth and flight routes</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-maps"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-maps/screenshots/regions.png" alt="States, flows, hexbin, OpenStreetMap basemap" width="100%"><br><sub>States, flows, hexbin, OpenStreetMap basemap</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-maps"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-maps/screenshots/projections.png" alt="Map projections (incl. equal-area)" width="100%"><br><sub>Map projections (incl. equal-area)</sub></a></td></tr>
  478. <tr><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-maps"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-maps/screenshots/conic_polar.png" alt="Conic (USA, Europe) and polar maps" width="100%"><br><sub>Conic (USA, Europe) and polar maps</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-maps"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-maps/screenshots/globe.png" alt="Globe with a great-circle route" width="100%"><br><sub>Globe with a great-circle route</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-maps"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-maps/screenshots/globe_spin.gif" alt="Spinning globe" width="100%"><br><sub>Spinning globe</sub></a></td></tr>
  479. </table>
  480. ### Parts, flows and polar
  481. <table>
  482. <tr><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-pie-donut"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-pie-donut/screenshots/pie_donut.png" alt="Pie and donut charts" width="100%"><br><sub>Pie and donut charts</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-treemap-sunburst"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-treemap-sunburst/screenshots/treemap_sunburst.png" alt="Treemap and sunburst" width="100%"><br><sub>Treemap and sunburst</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-funnel-gauge"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-funnel-gauge/screenshots/funnel_gauge.png" alt="Funnel and gauge" width="100%"><br><sub>Funnel and gauge</sub></a></td></tr>
  483. <tr><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-sankey"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-sankey/screenshots/sankey.png" alt="Sankey diagram" width="100%"><br><sub>Sankey diagram</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-network"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-network/screenshots/network.png" alt="Network graph" width="100%"><br><sub>Network graph</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-network"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-network/screenshots/dependencies.png" alt="Arc diagram, edge bundling" width="100%"><br><sub>Arc diagram, edge bundling</sub></a></td></tr>
  484. <tr><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-polar-radar"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-polar-radar/screenshots/polar_radar.png" alt="Polar and radar charts" width="100%"><br><sub>Polar and radar charts</sub></a></td></tr>
  485. </table>
  486. ### Axes, layout, text and style
  487. <table>
  488. <tr><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-subplots-shared"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-subplots-shared/screenshots/subplots_shared.png" alt="Subplots with shared axes" width="100%"><br><sub>Subplots with shared axes</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-log-scales"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-log-scales/screenshots/log_scales.png" alt="Logarithmic scales" width="100%"><br><sub>Logarithmic scales</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-broken-axis"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-broken-axis/screenshots/broken_axis.png" alt="Broken axes" width="100%"><br><sub>Broken axes</sub></a></td></tr>
  489. <tr><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-formats"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-formats/screenshots/formats.png" alt="Tick formats" width="100%"><br><sub>Tick formats</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-annotations"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-annotations/screenshots/annotations.png" alt="Annotations" width="100%"><br><sub>Annotations</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-math"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-math/screenshots/math.png" alt="Math notation (TeX)" width="100%"><br><sub>Math notation (TeX)</sub></a></td></tr>
  490. <tr><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-international"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-international/screenshots/international.png" alt="Any language and emoji" width="100%"><br><sub>Any language and emoji</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-accessibility"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-accessibility/screenshots/risky.png" alt="Color vision simulation" width="100%"><br><sub>Color vision simulation</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-themes"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-themes/screenshots/theme_light.png" alt="Theme: light" width="100%"><br><sub>Theme: light</sub></a></td></tr>
  491. <tr><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-themes"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-themes/screenshots/theme_dark.png" alt="Theme: dark" width="100%"><br><sub>Theme: dark</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-themes"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-themes/screenshots/theme_ggplot.png" alt="Theme: ggplot" width="100%"><br><sub>Theme: ggplot</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-themes"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-themes/screenshots/theme_seaborn.png" alt="Theme: seaborn" width="100%"><br><sub>Theme: seaborn</sub></a></td></tr>
  492. <tr><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-themes"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-themes/screenshots/theme_minimal.png" alt="Theme: minimal" width="100%"><br><sub>Theme: minimal</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-themes"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-themes/screenshots/theme_publication.png" alt="Theme: publication" width="100%"><br><sub>Theme: publication</sub></a></td><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-themes"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-themes/screenshots/theme_solarized.png" alt="Theme: solarized" width="100%"><br><sub>Theme: solarized</sub></a></td></tr>
  493. <tr><td width="33%" align="center"><a href="https://github.com/dataviz-rs/dataviz-examples/tree/main/plot-themes"><img src="https://raw.githubusercontent.com/dataviz-rs/dataviz-examples/main/plot-themes/screenshots/theme_high_contrast.png" alt="Theme: high contrast" width="100%"><br><sub>Theme: high contrast</sub></a></td></tr>
  494. </table>
  495. ## JavaScript
  496. The same renderer in WebAssembly ([`wasm/npm`](wasm/npm), npm package
  497. `dataviz-rs`): charts from a JSON spec in the browser, Node, Deno and Bun;
  498. SVG, PNG, HTML or a live, interactive canvas.
  499. ```js
  500. import { init, Chart } from "dataviz-rs";
  501. await init();
  502. new Chart({ type: "line", x: [0, 1, 2], y: [1, 3, 2] }).mount(canvas);
  503. ```
  504. ## C and C++
  505. A C library with a header-only C++17 wrapper ([`capi/`](capi)) for Linux,
  506. macOS and Windows, plus static libraries for iOS and Android. It covers
  507. every chart type and all outputs, raw pixels for your own UI,
  508. interactive windows and live data. Large arrays are passed as pointers,
  509. never as JSON text. With CMake:
  510. ```cmake
  511. add_subdirectory(dataviz/capi dataviz)
  512. target_link_libraries(app PRIVATE dataviz::dataviz)
  513. ```
  514. ```cpp
  515. #include "dataviz.hpp"
  516. dataviz::Figure fig(900, 500);
  517. fig.axes().line(t, v, dataviz::Style().label("signal"));
  518. fig.save("signal.png");
  519. ```
  520. ## Python
  521. The same renderer for Python ([`python/`](python)): NumPy, pandas and
  522. Polars data, Jupyter display, 5–22× faster than matplotlib. Wheels for
  523. Linux, macOS and Windows (Python 3.9+) are on
  524. [PyPI](https://pypi.org/project/dataviz-rs/):
  525. ```sh
  526. pip install dataviz-rs # imported as `dataviz`
  527. ```
  528. ```python
  529. import numpy as np, dataviz as dv
  530. x = np.linspace(0, 10, 100_000)
  531. fig = dv.Figure(900, 500, title="Signal")
  532. fig.axes().line(x, np.sin(x), label="sin").set(x_label="t [s]")
  533. fig.save("signal.png")
  534. ```
  535. ## Differences from matplotlib
  536. `dataviz.pyplot` covers the common calls of matplotlib's pyplot and `Axes`
  537. API (listed in the [Python README](python#matplotlib-code-unchanged)), not
  538. all of matplotlib. Keep using matplotlib when you need:
  539. - **Calls that are missing:** `annotate`, `errorbar`, `contour`, `step`,
  540. `stackplot`, `hexbin`, `colorbar`, `twinx`, `set_xticks`,
  541. `tick_params`, and the artist, patch and transform APIs. (`dv.Figure`
  542. has contours, through `chart("contour", …)`, and colorbars, through
  543. `colorbar=` on heatmaps and colored scatters, but under its own names.)
  544. - **Fine control:** `rcParams`, tick locators and formatters, custom
  545. projections, GridSpec and `sharex`/`sharey` in `subplots`.
  546. - **Every argument honored:** unknown keyword arguments are *ignored*,
  547. not rejected, so a script keeps running but may look different (for
  548. example `hist(bins=[…edges…])`, `bar(width=…)` or `savefig(dpi=…)`).
  549. The docstrings say what each call supports.
  550. - **Embedding in Qt, Tk or GTK applications** through matplotlib's
  551. backends, and the many libraries built on matplotlib (seaborn, pandas
  552. `.plot()`).
  553. ## Use it from Claude
  554. The [Claude Code plugin](claude-plugin) gives Claude all of these charts:
  555. it draws from your data, CSV/JSON files and PDB structures, looks at the
  556. image and refines it.
  557. ```text
  558. /plugin marketplace add dataviz-rs/dataviz
  559. /plugin install dataviz@dataviz
  560. ```
  561. Then ask: *"plot `bench.csv` and compare the branches"*, *"show 1UBQ as a
  562. cartoon with its Ramachandran plot"*, or use `/dataviz:plot` and
  563. `/dataviz:molecule`. Other MCP clients use the server directly:
  564. `cargo install dataviz-mcp` ([dataviz-mcp](mcp)).
  565. ## Installation
  566. ```toml
  567. [dependencies]
  568. dataviz = "1"
  569. # dataviz = { version = "1", features = ["pdf", "gpu"] }
  570. # dataviz = { version = "1", default-features = false } # headless / wasm32
  571. ```
  572. | Feature | Default | What it adds |
  573. |---|---|---|
  574. | `window` | yes | interactive windows (`minifb`) |
  575. | `pdf` | no | PDF output |
  576. | `gpu` | no | GPU rasterization (`wgpu`) |
  577. Requires Rust 1.89 or newer. On Linux the `window` feature needs the usual
  578. windowing libraries (`libxkbcommon-dev`, `libwayland-dev`).
  579. ## Stability
  580. dataviz follows [semantic versioning](https://semver.org) from 1.0 on:
  581. code written for 1.0 keeps compiling and working with every 1.x release.
  582. - **Covered:**
  583. - the public Rust API, with its cargo features (they are kept);
  584. - the JSON spec format (fields keep their meaning; new fields and chart
  585. types are added);
  586. - the C API in `dataviz.h` (functions keep their signatures; new ones
  587. are added).
  588. - **New things come in minor versions (1.1, 1.2, …).** Enums that grow
  589. (chart kinds, projections, colormaps, markers, …) are
  590. `#[non_exhaustive]`, so a match on them needs a `_` arm.
  591. - **Fixes come in patch versions.**
  592. - **Not covered:**
  593. - the exact pixels of a rendering (anti-aliasing, layout and tick
  594. choices can improve);
  595. - items marked `#[doc(hidden)]`;
  596. - performance characteristics.
  597. - **Minimum Rust version:** raised only in minor versions, and noted in
  598. the changelog.
  599. The Python (`dataviz-rs` on PyPI) and npm (`dataviz-rs`) packages have
  600. their own versions.
  601. ## Changelog
  602. See [CHANGELOG.md](CHANGELOG.md).
  603. ## License
  604. MIT; see `LICENSE`. The embedded DejaVu Sans font has its own license
  605. (`assets/DejaVuSans-LICENSE.txt`); the world map is Natural Earth (public
  606. domain).
  607. ## How it's made
  608. dataviz is developed with heavy AI assistance (Claude Code). The author
  609. decides the design and the scope, reviews the changes and runs the tests,
  610. fuzzing and benchmarks; the benchmark code is public so the numbers can be
  611. checked. Bug reports about anything that looks wrong are very welcome.
  612. ## Contributing
  613. Bug reports, ideas and pull requests are welcome at
  614. <https://github.com/dataviz-rs/dataviz>. Issues labelled
  615. [good first issue](https://github.com/dataviz-rs/dataviz/labels/good%20first%20issue)
  616. are a good place to start.
  617. If dataviz saves you time, a ⭐ on GitHub helps others find it.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.