-
Notifications
You must be signed in to change notification settings - Fork 167
Closed
Description
Thanks for developing such a nice package.
There's a very strange problem under a fixed aspect coordinates, and here's a simple example to reproduce the problem.
df1 <- data.frame(x = 1:10, y = rnorm(10))
df2 <- expand.grid(x = 1:10, y = 1:10)
df2$value <- rnorm(100)
df3 <- data.frame(x = runif(10, 0, 3), y = 1:10)
library(ggplot2)
library(patchwork)
p1 <- ggplot(df1, aes(x, y)) +
geom_point() +
scale_x_continuous(limits = c(0.5, 10.5), expand = c(0, 0)) +
coord_fixed()
p2 <- ggplot(df2, aes(x, y, fill = value)) +
geom_tile() +
scale_x_continuous(limits = c(0.5, 10.5), expand = c(0, 0)) +
scale_y_continuous(limits = c(0.5, 10.5), expand = c(0, 0)) +
coord_fixed()
p3 <- ggplot(df3, aes(x, y)) +
geom_col() +
scale_x_reverse() +
scale_y_continuous(limits = c(0.5, 10.5), expand = c(0, 0)) +
coord_fixed()
plot_spacer() + p1 + p3 + p2 +
plot_layout(nrow = 2, byrow = TRUE, guides = "collect")
p1 + plot_spacer() + p2 + p3 +
plot_layout(nrow = 2, byrow = TRUE, guides = "collect")
p3 + p2 + plot_spacer() + p1 +
plot_layout(nrow = 2, byrow = TRUE, guides = "collect")
p2 + p3 + p1 + plot_spacer() +
plot_layout(nrow = 2, byrow = TRUE, guides = "collect")
Metadata
Metadata
Assignees
Labels
No labels



