Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

theme(plot.margin) doesn't work for ggbreak #71

Open
Nitin123-4 opened this issue May 21, 2024 · 2 comments
Open

theme(plot.margin) doesn't work for ggbreak #71

Nitin123-4 opened this issue May 21, 2024 · 2 comments

Comments

@Nitin123-4
Copy link

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.

@drdna
Copy link

drdna commented Sep 9, 2024

coord_cartesian(clip="off") also fails

@BajczA475
Copy link

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants