Public
Edited
Feb 26
1 star
Insert cell
Insert cell
Plot.plot({
height: 350,
marginLeft: 80,
x: { domain: [0, 200] },
color: { domain: Plot.valueof(penguins, "sex"), legend: true },
fy: { axis: null },
marks: [
Plot.gridX(),
Plot.text(["island", "species", "sex"], {
frameAnchor: "middle",
text: Plot.identity,
fy: Plot.identity,
render([i], { scales }, { channels }, dimensions) {
return svg`<g>${Plot.barX(
penguins,
Plot.groupY(
{ x: "count" },
{ y: channels.text.value[i], fill: "sex" }
)
).plot({
...dimensions,
...scales,
x: { ...scales.x, axis: null }
})}`;
}
})
]
})
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