observablehq / plot

A concise API for exploratory data visualization implementing a layered grammar of graphics
https://observablehq.com/plot/
ISC License
4.46k stars 182 forks source link

projection should support the angle option #2245

Open Fil opened 5 days ago

Fil commented 5 days ago

https://d3js.org/d3-geo/projection#projection_angle

Plot.plot({
  projection: {
    type: ({ width, height }) =>
      d3.geoEqualEarth().angle(11).fitSize([width, height], { type: "Sphere" })
  },
  marks: [Plot.graticule(), Plot.sphere()]
})

should be available as

Plot.plot({
  projection: {
    type: "equal-earth",
    angle: 11
  },
  marks: [Plot.graticule(), Plot.sphere()]
})