Unlisted
Edited
Apr 16, 2024
Insert cell
Insert cell
Insert cell
Insert cell
viewof binWidth = Inputs.range([2, 50])
Insert cell
Plot.plot({
color: { legend: true, scheme: "BuGn" },
round: true,
width: 800,
marks: [
Plot.dot(
athletes,
Plot.hexbin(
{ fill: "density" },
{
x: "weight",
y: "height",
fx: (x) => "Binned Density",
binWidth
}
)
),
Plot.raster({
fill: gaussianDensity2d(
...sampleMeanCov2(
athletes,
(x) => x.weight,
(x) => x.height
)
),
x1: d3.min(athletes, (x) => x.weight),
x2: d3.max(athletes, (x) => x.weight),
y1: d3.min(athletes, (x) => x.height),
y2: d3.max(athletes, (x) => x.height),
fx: (x) => "Gaussian Density",
pixelSize: 4
})
]
})
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