Hi @fil, I observed that clipping is not available (or at least I am not able to find/use it):
I tried "interruptedBoggs" as projection...
Sorry to bother if I am jumping ahead of the roadmap...
clipping is available now—thanks for asking ;-)
I'm not sure yet about the syntax (I'd prefer it to be set from the projection rather than as a root clipSphere: true option). See the cell below
Great, thanks!
I agree with you that it could/should come with the projection...I guess that from a Plot.carto user perspective you probably do not have to worry about that kind of details.
(scary implementation...black magic for me but fascinating!)
Hi Phil,
I see you have a "Download as PNG/SVG" but in the cells in my notebooks I do not get it...
For example the map in this one
https://observablehq.com/@espinielli/overflight-variation
does not show the Download options...what did I do wrong? Or what could I do differently?
(i also tried without success what described in this one https://observablehq.com/@mbostock/saving-svg)
Any hints, much appreciated.
Thanks a million
There is an issue currently with observable, that makes the download svg option available only on svg cells, and since you added a legend the cell has become html. Temporary workaround is to remove the legend, download the map, add the legend again. Or add the legend in a second cell, so you can download it separately. I hope we'll find a fix soon.
Hi @fil,
I have used a fully defined projection like
`Plot.carto({
projection: d3.geoAzimuthalEqualArea().scale(1100),
rotate: [-3, -64],
...
})
`
but then it does not rescale as the width/height of the parent container change, i.e. on smaller devices than a desktop browser...I guess that is due to me forcing the scale but if I do not do that I get the full world map while I would like to 'focus' on a certain part of Europe.
Should I instead use a fitExtent (instead of scale) on a custom geo polygon when defining the projection?
Any suggestions/helps is welcome.
FYI the full blown notebook example is
https://observablehq.com/@espinielli/central-route-charging-office-zones-and-rates
Yes exactly: if you pass in a defined D3 scale, Plot.Carto will use it as is, and not try to change its configuration. So if you want it to be responsive, you have to define the projection downstream of *width*. For this you can use fitExtent, or maybe just something like projection.scale(1200 * (width / 928))
you are right (of course)! Thanks
PS: where is 928 magic number coming from? just curious ;-)
PPS: now I work to scale the labels down too...or maybe not...so much work!
Super thanks again.
928 is observable's usual width when I use it ;-)
I'd suggest that you didn't rescale the labels, but instead set the width and height of the map to a certain minimum size, where the labels are still readable. If the browser then resizes the svg everything will resize down proportionally. I'm off for the week-end, but happy to help you with this next week.
@fil, all is solved and working perfectly on my side...
Super thank you for you prompt support!!!!!
(I will further study the font size...but not critical for my use case for now)