0

I need to plot some data with a few outliers so I want to use a axis break in y axis to show all values. However, I tried many different R packages and none of them gave me a good solution. I tried gg.gap and ggbreak. I was able to use ggbreak to create individual plots with axis breaks but when I combine them using ggarrange, the axis breaks disappeared. Another challenge is that ggbreak tends to mess up the y axis limit so that I no longer can add annotations outside of the plot area. Anyone has good suggestions for this issue? Thank you.

tried gg.gap and ggbreak.

Jason
  • 21
  • 1
  • 1
    Welcome to SO! Wish you a joyful day! It would be easier for other to help if you can provide a reproducilbe example with image of what you have tried and what you want. https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example – Sinh Nguyen Jun 07 '23 at 02:46
  • 1
    Have you tried other packages to combine plots like gridExtra, cowplot and patchwork? – Roman Luštrik Jun 07 '23 at 04:32
  • not yet. let me try them. thanks – Jason Jun 07 '23 at 14:02
  • I tried pathwork. E.g I have 6 subplots and want a 3X2 layout. So I use P1 + P2 +P3 +P4 +P5 +P6 + plot_layout(ncol=3, widths=c(1,1,1)). But I end up with something strange: P1 has the smallest width and P6 has the largest width. I can't control the width of the subplot? I just need the same width for each subplot. – Jason Jun 08 '23 at 01:35

0 Answers0