Plot.plot({
projection: {
type: ({ width, height }) => {
const radians = (deg) => (Math.PI * deg) / 180;
return d3.geoTransform({
point: function (lon, lat) {
const [lambda, phi] = [radians(lon), radians(lat)];
const scale = 0.15;
this.stream.point(
scale * width * lambda * Math.cos(phi) + width / 2,
scale * width * phi + height / 2
);
}
});
}
},
marks: [Plot.graticule({ strokeOpacity: 1 })]
})