…
If you use NPM, npm install d3-contour
. Otherwise, download the latest release. You can also load directly from d3js.org, either as a standalone library or as part of D3 4.0. AMD, CommonJS, and vanilla environments are supported. In vanilla, a d3
global is exported:
<script src="https://d3js.org/d3-contour.v0.0.min.js"></script>
<script>
var points = d3.contour(geq(0));
function geq(value) {
return function(i, j) {
return i >= 0
&& j >= 0
&& i < width
&& j < height
&& values[i + j * width] >= value;
};
}
</script>
Try d3-contour in your browser.
# d3.contour(test[, start]) <>
…