Closed dtdoering closed 6 years ago
Yes, this is a limitation of the specific alignment algorithm that I use, and it cannot be circumvented within plot_grid()
. I recommend you try ggarrange()
from the egg package or plot composition via the patchwork package.
I'm currently trying to align some plots using
plot_grid()
, with the axis text displayed on the outside edges of the plot and with minimal spacing between the plots. I want to have both of their axes aligned. However, when I use thealign
options, the plots have unwanted space between them as if the axes are still in their normal positions.Here's a reprex:
This seems to be due to the use of
scale_x_continuous(position = "right")
orscale_y_continuous(position = "top")
when attempting to align them:Un-aligned: OK
Align horizontally: space along middle line
Align vertically: space along center line
Align both: space along both
Any idea what could be causing this behavior?