Public
Edited
Sep 13, 2022
1 star
Insert cell
Insert cell
Plot.plot({
marks: [Plot.dot(penguins, { x: "body_mass_g", y: "island", fill: "sex" })],
y: { type: "band", tickSize: 0 }
})
Insert cell
Plot.plot({
marks: [Plot.barY(penguins, Plot.groupX({y:"count"}, { x: "island", fill: "sex" }))],
x: { type: "band", tickSize: 0 }
})
Insert cell
Insert cell
Insert cell
Plot.plot({
marks: [
Plot.barY(
penguins,
Plot.stackY({
// for this reverse to work, we need an explicit Plot.stackY;
// we could dispense with it if we just wanted an _order_.
reverse: reverseStack,
...Plot.groupX(
{ y: "count" },
{
x: "island",
order: "sum",
fill: "sex",
sort: { color: "height", reverse: reverseColor }
}
)
})
)
],
color: { legend: true }
})
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