contour = d3
.contourDensity()
.x(d => d.pos[0])
.y(d => d.pos[1])
.thresholds(function(c) {
let tz = 20;
var stop = d3.max(c);
tz = d3.tickStep(0, stop, tz);
tz = d3.range(0, Math.floor(stop / tz) * tz, tz);
tz.shift();
mutable debug = tz;
return thresholds;
})
.size([width, height + 100])