my code is quite similar to the following example. I have categories (internally stored as factors) and I need to plot multiple graphs. When I plot them the tich for the y-axis are not in the exact same height as you can see in the figure. Is there a solution for this?
library(ggplot2)
library('grid')
a=ggplot(iris, aes(x = Sepal.Length, y = Species)) + geom_density_ridges()
b=ggplot(iris, aes(x = Sepal.Width, y = Species)) + geom_density_ridges()
test=cbind(ggplotGrob(a), ggplotGrob(b),size="last")
grid.draw(test)