Open mdsumner opened 7 years ago
This works fine now in the new regime:
## new regime (github master branches 2017-02-15)
library(sf)
library(ggplot2)
ggplot(st_as_sf(wrld_simpl[24, ])) + geom_sf() + coord_sf(crs = proj)
ggplot(st_transform(st_as_sf(wrld_simpl[24, ]), proj)) + geom_sf()
aye. gave a shout out to the sf
ecosystem in the ggalt 0.4.0 blog announcement (shld be hitting rbloggers in the AM). Hope to retire coord_proj()
soon ;-)
oh, but what about non-sf data?
Sorry to post this without a solution, but I have to leave it for now.
I get an error from proj4::project for (seemingly) identical inputs when used in coord_proj(), but not directly.
It's likely to do with the coord_munching which I haven't explored yet - these polygons are both stretched around the edges of the laea map with these parameters, and that would likely be true for different polygons and projection combos. (It might be true for the old mapproj idioms for ggplot, but I never learnt to use them).
I don't know if this is a munching problem for ggalt or ggplot2, but either way I'm happy to help. A general "topojson"-like solution would be good in R, etc. etc.
Preparation.