Published unlisted
Edited
Jul 20, 2021
Insert cell
Insert cell
import { data } from "@observablehq/plot-exploration-penguins"
Insert cell
Plot.rectY(
data,
Plot.stackY({
...Plot.binX(
{ y: "count", fill: "first", title: (d) => JSON.stringify(d[0]) },
Plot.transform({
x: "body_mass",
fill: "species",
z: "species",
order: "value",
sort: "sex"
})
),
reverse: true
})
).plot()
Insert cell
Insert cell
Plot.rectY(
data,
Plot.binX(
{ y: "count" },
{ x: "body_mass", fill: "species", order: "value", reverse: true } // 🌶 reverse gets eaten!
)
).plot()
Insert cell
Plot439.rectY(
data,
Plot439.binX(
{ y: "count" },
{ x: "body_mass", fill: "species", order: "value", reverse: true } // 👍
)
).plot()
Insert cell
{
const A = Plot.binX(
{
y: "count"
},
{ x: "body_mass", fill: "species", order: "sum", reverse: true }
);
A.transform(data, [d3.range(data.length)]);
return A;
}
Insert cell
import { Plot } from "@fil/plot-splom" // for Plot.transform
Insert cell
Plot439 = FileAttachment("plot.umd.js").url().then(require)
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