dgkf / ggpackets

Cleaner composition of ggplot layers
https://dgkf.github.io/ggpackets
Other
68 stars 1 forks source link

Nesting of ggpackets #30

Open dazu89 opened 4 days ago

dazu89 commented 4 days ago

This is a mar-ve-lous package, thank you, for making it available to the wider public! Maybe it is not supposed to be used that way, but upon nesting packets, I am running into different issues. In this case ‹Error in rlang::quo_get_expr(): ! quo must be a quosure›

library(sf)
library(stars)
library(ggpackets)
library(dplyr)
nc <- st_read(system.file("shape/nc.shp", package="sf"))
gg_p1= ggpacket() +
  geom_sf(data = nc)
gg_p1

gg_p2 = ggpacket() + 
  gg_p1 +
  geom_sf(data = nc[1,], fill = "red")
gg_p2

In other cases, which motivated this issue, I am unable to overwrite scale_x_continuous provided by a ggpackets or get other errors upon nesting such as ‹Error in (function (mapping = aes(), data, na.rm = TRUE, show.legend = NA, : argument "data" is missing, with no default› (this one is cryptic, as in no statement I did omit the data argument. Maybe I have overlooked something... in anycase, this would be a cool functionality and any advise is appreciated!

dgkf commented 4 days ago

Thanks for filing this. I'll investigate. I can't promise a timeline, but I'll definitely get it back up and running.