Published
Edited
Sep 5, 2021
2 stars
Insert cell
Insert cell
Insert cell
Insert cell
Plot.plot({
marks: [
Plot.dot(athletes, {x: "weight", y: "height", fill: "sex", fillOpacity: 0.3})
]
})

// this is possible, but not much more work to make it in the standard format
// Plot.dot(athletes, {x: "weight", y: "height", fill: "sex", fillOpacity: 0.3}).plot()
Insert cell
Insert cell
// the barY extends vertically, while ruleY creates a horizontal line
Plot.plot({
marks: [
Plot.barY(athletes, Plot.groupX({y: "count"}, {x: "sex", fillOpacity: 0.2})),
Plot.ruleY([0], {stroke: "red", strokeWidth: 3})
]
})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more