0

I did a lot of googling to find a possible solution for this but it does not look possible by design.

I made two ggplots each with 4 facets and used grid.arrange ot view them side by side but their y-axis limits aren't exactly the same so direct comparison is hard. I just want to manually change the y limits for each facet of the second graph so they match the first.

Is this utterly impossible / not recommended?

guy
  • 1,021
  • 2
  • 16
  • 40
  • Cant you add scale_y_conitnous(limits=c(lower limit, uper limit)) to both ggplot? – MikolajM Jun 22 '17 at 17:51
  • @MikolajM wouldn't that force all facets of each ggplot to have the same limits? – guy Jun 22 '17 at 17:57
  • Yes it would, I understood that this is what you want to achieve. Ok, so you want to have different scales for each facet but they should be the same if corresponding ggplots. How does your single ggplot look like? 4 plots in a row? or in a grid 2x2? Maybe you cold, merge the datasets, use faced_grid and put it all together in a 4x2 grid? – MikolajM Jun 22 '17 at 18:10
  • [Please share a reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). There's not an easy or built-in way to do it, but there may be possibilities [with data augmentation similar to here](https://stackoverflow.com/q/40137060/903061) or through directly editing the plot object. – Gregor Thomas Jun 22 '17 at 18:25

0 Answers0