Observable Plot is a âJavaScript library for visualizing tabular data, focused on accelerating exploratory data analysis. It has a concise, memorable, yet expressive interface, featuring scales and layered marks.â Itâs the sister library to our other visualization library, D3.js. Observable Plot is available by default as Plot
in Markdown, but you can import it explicitly like so:
import * as Plot from "npm:@observablehq/plot";
To display a chart, call Plot.plot
or mark.plot
like so:
Plot.rectY(alphabet, {x: "letter", y: "frequency"}).plot()
As another example, hereâs a pretty (but meaningless) Voronoi chart:
const random = d3.randomLcg(42);
const x = Array.from({length: 500}, random);
const y = Array.from({length: 500}, random);
const chart = Plot.voronoi(x, {x, y, fill: x}).plot({nice: true});
display(chart);
To include a sparkline in your text â or dots â say:
⦠include a ${Plot.lineY([1, 2, 0, 4, 0, 3, 1, 5, 7, 2, 3]).plot({axis: null, width: 80, height: 18})} sparklineâ¦
⦠dots ${Plot.dotX("abcdef", {r: 5, fill: Plot.identity}).plot({axis: null, width: 80, height: 12})} â sayâ¦
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4