We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If a "broken" plot is combined with other plots using patchwork the axes are misaligned, e.g.:
patchwork
library(tidyverse) library(ggbreak) library(patchwork) df <- tibble( x = seq(0, 2*pi, 0.01), y1 = sin(x), y2 = sin(x * 2) + 100) plt1 <- ggplot(df, aes(x, y1)) + geom_line() plt2 <- plt1 + scale_x_break(c(1, 3), expand = F) plt3 <- ggplot(df, aes(x, y2)) + geom_line() (plt2 + plt1) / (plt1 + plt3) # Same with plot_layout, as in # plt2 + plt1 + plt1 + plt3 + plot_layout(nrow=2)
Incidentally, if I try to combine the same plots with cowplot instead of patchwork, the ggbreak::scale_x_break layer disappears:
cowplot
ggbreak::scale_x_break
library(cowplot) plot_grid(plt2, plt1, plt1, plt3, nrow=2, align="hv")
The text was updated successfully, but these errors were encountered:
I would like to second the above issues
Sorry, something went wrong.
No branches or pull requests
If a "broken" plot is combined with other plots using
patchwork
the axes are misaligned, e.g.:Incidentally, if I try to combine the same plots with
cowplot
instead ofpatchwork
, theggbreak::scale_x_break
layer disappears:The text was updated successfully, but these errors were encountered: