Is it possible to use a projection and include graticule labels with plot.geo? #2100
-
Based on the docs I can't seem to find a method to add a projection (and zoom), with graticule labels—am I missing something obvious? Trying to force the axis labels also does not seem to work, but I might not understand the API well enough.
vs.
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
(I think you have the images reversed.) Graticule labels is a difficult problem if you want to solve it "in general", as the choice of labels and placements depends a lot on the projection. (For a mildly complicated example see https://observablehq.com/@d3/graticule-labels-stereographic). You have to make room for the labels, then select the values you want to display on each of the four sides, then display them in the best location — which often might not be a location on the sphere. https://observablehq.com/@fil/graticule-labels-2100 |
Beta Was this translation helpful? Give feedback.
-
This is great thank you. Was clear to follow your example and modify for my region. A quick follow-up do you know if it's possible to also add tick marks in a less hacky manner than using a hyphen and some more manual padding?
|
Beta Was this translation helpful? Give feedback.
(I think you have the images reversed.)
Graticule labels is a difficult problem if you want to solve it "in general", as the choice of labels and placements depends a lot on the projection. (For a mildly complicated example see https://observablehq.com/@d3/graticule-labels-stereographic).
You have to make room for the labels, then select the values you want to display on each of the four sides, then display them in the best location — which often might not be a location on the sphere. https://observablehq.com/@fil/graticule-labels-2100