Public
Edited
May 12, 2023
1 fork
1 star
Insert cell
Insert cell
Plot.plot({
height: 580,
color: { type: "diverging", scheme: "PuOr" },
fx: { tickFormat: (f) => f?.name },
fy: { tickFormat: (f) => f?.name },
marks: [
Plot.contour({
fill: (x, y, { fx, fy }) => fx(x) * fy(y),
fx: [sin, sin, lin, lin],
fy: [cos, lin, lin, cos],
x1: 0,
y1: 0,
x2: fourPi,
y2: fourPi,
interval: 0.2
}),
Plot.frame()
]
})
Insert cell
function lin(x) { return x / fourPi; }
Insert cell
sin = Math.sin
Insert cell
cos = Math.cos
Insert cell
fourPi = 4 * Math.PI
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