map = ({ points, scheme = "viridis" }) =>
Plot.plot({
width: 490,
height: 943,
inset: 20,
insetTop: 5,
projection: { type: "reflect-y", domain: land[0] },
color: { domain: [0, 1], scheme, reverse: true, type: "sqrt" },
marks: [
Plot.frame({ fill: "oklch(90% 0.03 180deg)" }),
Plot.geo(land, { stroke: "oklch(95% 0.02 180deg)", strokeWidth: 18 }),
Plot.raster(points, {
interpolate,
x: "x",
y: "y",
fill: 0,
clip: land[0]
}),
Plot.contour(points, {
interpolate,
x: "x",
y: "y",
value: 0,
stroke: "oklch(20% 0.03 180deg)",
strokeWidth: 0.5,
clip: land[0]
}),
Plot.geo(land, { strokeWidth: 1.5 }),
Plot.dot(points, {
x: "x",
y: "y",
r: 0.1,
opacity: 0.1,
stroke: "black"
})
]
})