ggbreak
ggbreak copied to clipboard
theme(plot.margin) doesn't work for ggbreak
theme(plot.margin = margin(t = 2, l = 3, r = 2, b = 2, "cm")) has no impact when I am using scale_y_break. ggplot(mtcars, aes(x=cyl, y=mpg)) + geom_boxplot(fill="slateblue", alpha=0.2) + xlab("cyl")+ scale_y_break(15,20)+ theme(plot.margin = margin(t = 2, l = 3, r = 2, b = 2, "cm"))
please help with it.
coord_cartesian(clip="off") also fails
I had this happen to me also. I got around it by moving the legend to the top and then adding a top margin to that legend. Presumably, a similar trick could work in any direction if you only need to expand plot margin in one direction...