Skip to content

Commit

Permalink
link contours example
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed Jun 22, 2023
1 parent 4bb258e commit d84fc71
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions docs/d3-contour.md
Expand Up @@ -8,19 +8,22 @@ import PlotRender from "./components/PlotRender.js";

# d3-contour

<PlotRender :options='{
axis: null,
aspectRatio: 1,
marks: [
Plot.contour(volcano.values, {
width: volcano.width,
height: volcano.height,
fill: Plot.identity,
stroke: "black",
interval: 5
})
]
}' />
<div style="margin: 1em 0;">
<PlotRender :options='{
axis: null,
aspectRatio: 1,
marks: [
Plot.contour(volcano.values, {
width: volcano.width,
height: volcano.height,
fill: Plot.identity,
stroke: "black",
interval: 5
})
]
}' />
<a href="https://observablehq.com/@d3/volcano-contours/2?intent=fork" style="font-size: smaller;" target="_blank">Fork ↗︎</a>
</div>

This module computes contour polygons by applying [marching squares](https://en.wikipedia.org/wiki/Marching_squares) to a rectangular grid of numeric values. For example, the contours above show the topography of [Maungawhau](https://en.wikipedia.org/wiki/Maungawhau_/_Mount_Eden).

Expand Down

0 comments on commit d84fc71

Please sign in to comment.