Slackbot
04/07/2023, 7:41 PMMike Bostock
04/07/2023, 8:00 PM${…}
in conjunction with array.map, where each element in the array is an HTML element (such as an SVG element created by Plot).
For example, to preview various map projections:
<div style="display: grid; grid-gap: 0.875rem; grid-template-columns: repeat(auto-fill, minmax(160px, 5fr)); padding-bottom: 1px;">
${["orthographic", "equirectangular", "stereographic", "mercator", "equal-earth"].map((projection) => Plot.plot({
projection,
width: 320,
height: 200,
marks: [
Plot.frame(),
Plot.geo(land, {fill: "currentColor"})
]
}))}
</div>
Notebook: https://observablehq.com/d/a2aa0d75d19f6c0dJack Dundas
04/07/2023, 8:32 PM