Public
Edited
Nov 21
2 forks
12 stars
Insert cell
Insert cell
Insert cell
poly1 = ({type: "Polygon", coordinates: [[[0, 0], [0, 10], [10, 10], [10, 0], [0, 0]]]})
Insert cell
Insert cell
Insert cell
poly2 = ({type: "Polygon", coordinates: [[[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]]})
Insert cell
Insert cell
Insert cell
Insert cell
function preview(poly) {
return Plot.plot({
projection: {
type: "orthographic",
rotate: [-20, -20],
inset: 1
},
marks: [
Plot.geo(poly, {fill: "red", fillOpacity: 0.5}),
Plot.graticule({strokeOpacity: 0.3}),
Plot.line(poly.coordinates[0], {marker: "arrow"}),
Plot.sphere({strokeWidth: 2})
]
});
}
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