Professional Documents
Culture Documents
Combine Axes:scales Issue #150 Thomasp85:patchwork
Combine Axes:scales Issue #150 Thomasp85:patchwork
No one assigned
I often have a case where I have two plots with the same y-axis scales that I would like to show side by side, with the axis only
showing on the outer plot. Currently, I need to manually set the axis scales to be the same across plots and set the axis to be
Labels
element_blank() for one of the plots.
None yet
Would it be possible to add functions to do these steps within the patchwork composition, similar to the legend collapsing?
Projects
12
None yet
No milestone
yes, that is on the roadmap, though I can't say when it will appear
None yet
ashiklom commented on 23 Sep
Notifications Customize
+1 for this feature! But in the meantime, at least for axis labels, you can combine patchwork::patchworkGrob and
gridExtra::grid.arrange as a workaround. Haven't tested it extensively, but seems to do OK as a first pass: Subscribe
result <- p1 + p2
gt <- patchwork::patchworkGrob(result)
gridExtra::grid.arrange(gt, left = "Disp", bottom = "Hp // Cyl")
+1. And if we stack plots on top of each other, it would be great if it's possible to put the common y-axis label in the middle.
Write Preview
Leave a comment
Attach
Choose files by dragging
Files no files & dropping, selecting or pasting them.
selected
Comment
© 2020 GitHub, Inc. Terms Privacy Security Status Help Contact GitHub Pricing API Training Blog About