Charts with Observable Plot

Observable Plot is a concise JavaScript library for exploratory data visualization. It is available globally in Observable Framework - no import needed.

Display rule: Observable Framework displays the return value of a cell only when the cell is a single expression. For charts, keep data definitions in a separate cell above, and put only Plot.plot(...) in the chart cell.


Bar Chart


Line Chart


Scatter Plot


Histogram


Reactive Chart with Inputs

The power of Observable Framework: charts update automatically when inputs change.

When the chart cell is a single Plot.plot(...) expression, Observable Framework can display it and react to dependency changes correctly:


Using Real Data from a File

Apply the same patterns to data from a CSV file:


Plot Quick Reference

Mark Use for
Plot.barX / barY Bar chart
Plot.lineY Line chart
Plot.dot Scatter plot
Plot.rectY + binX Histogram
Plot.areaY Area chart
Plot.text Text annotations
Plot.ruleX / ruleY Reference lines
Plot.geo Geographic polygons

Full documentation: observablehq.com/plot