0

I'm using r-markdown to make one pagers. I have all my plots set in place but they do not line up nicely. The plots area is lined up but where the bars start is different for each plot. How can i set it so that it's always lined up? I want to line up the green lines.The start of the plots (maroon line) is always in line.

NB! The two plots are made separately from one another as they use different data.

enter image description here

Picataro
  • 151
  • 6
  • 1
    In this special case I would try to use a `facet_grid` approach. Or try `cowplot`. – Roman Jun 10 '22 at 10:16
  • I will check them out. Is there a way i can set the length of the space between the maroon and green lines manually? – Picataro Jun 10 '22 at 10:47
  • The patchwork package is also good for arranging plots. – Tob Jun 10 '22 at 11:01
  • As far as I can tell, you can't explicitly define the width of the axis text area. Even when you wrap the long text to a set number of max characters, the width of the area is not the same in both plots because the text is not nonospaced. It seems however, you can define the panel area. This solution might be helpful, it [offers a way to set the size of facets](https://stackoverflow.com/questions/32580946/setting-absolute-size-of-facets-in-ggplot2) – guasi Jun 10 '22 at 18:52

0 Answers0