cran / ggalt

:exclamation: This is a read-only mirror of the CRAN R package repository. ggalt — Extra Coordinate Systems, 'Geoms', Statistical Transformations, Scales and Fonts for 'ggplot2'. Homepage: https://github.com/hrbrmstr/ggalt Report bugs for this package: https://github.com/hrbrmstr/ggalt/issues
Other
0 stars 0 forks source link

issue with coord_proj() and ggplot2 plotting. #1

Open colinaverill opened 4 years ago

colinaverill commented 4 years ago

Below is some simplified code to plot a world map using ggplot2. I originally posted this as an issue over at ggplot2 who took it down and told me to post it over here. This code was working fine for me until April, at which point I started getting Error: not implemented. Line by line testing links this outcome to the coord_proj() line. There was some discussion of this on stackoverflow, but no definitive solution was found. Reproducible example and error messages below.

world <- ggplot2::map_data("world")
world <- world[world$region != "Antarctica",]
gg <- ggplot()
gg <- gg + geom_cartogram(data=world, map=world,
                          aes(x=long, y=lat, map_id=region))
gg <- gg + coord_proj("+proj=wintri")
gg

Error messages:

Error: Not implemented
Run `rlang::last_error()` to see where the error occurred.
> rlang::last_error()
<error/rlang_error>
Not implemented
Backtrace:
  1. (function (x, ...) ...
  2. ggplot2:::print.ggplot(x)
  4. ggplot2:::ggplot_gtable.ggplot_built(data)
  5. base::Map(...)
  6. base::mapply(FUN = f, ..., SIMPLIFY = FALSE)
  8. l$draw_geom(d, layout)
  9. ggplot2:::f(..., self = self)
 10. self$geom$draw_layer(data, self$geom_params, layout, layout$coord)
 11. ggplot2:::f(..., self = self)
 12. base::lapply(...)
 13. ggplot2:::FUN(X[[i]], ...)
 16. ggalt:::f(...)
 17. ggplot2::coord_munch(coord, map, panel_scales)
 18. coord$backtransform_range(range)
 19. ggplot2:::f(..., self = self)
Run `rlang::last_trace()` to see the full context.
gaborcsardi commented 4 years ago

Hi, this is a read only mirror of CRAN, please see the package authors in the DESCRIPTION file. Thanks!