Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plot_layout axes = "collect" not working with geom_sf #366

Open
Maschette opened this issue Jun 25, 2024 · 1 comment
Open

plot_layout axes = "collect" not working with geom_sf #366

Maschette opened this issue Jun 25, 2024 · 1 comment

Comments

@Maschette
Copy link

Maschette commented Jun 25, 2024

Hi,
It seems that in both the cran and dev versions the axes = "collect" option in plot_layout() does not seem to be working. I also tried the "collect_x" option and it didnt work.

I do note the guide = "collect" is still working.

library(sf)
library(ggplot2)
library(patchwork)

nc <- sf::st_read(system.file("shape/nc.shp", package = "sf"), quiet = TRUE)
map <- ggplot(nc) +  geom_sf(aes(fill = AREA)) + xlab("sf plot")
map + map+plot_layout(ncol = 1, axes = "collect_x")

image

@thomasp85
Copy link
Owner

axes are still being treated differently in coord_sf() which complicates this... I'll leave it open here but it will likely need a fix in ggplot2 rather than in patchwork

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants