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

ggbreak with y-axis position right (incompatible) #45

Open
yaqinguo opened this issue Mar 24, 2022 · 0 comments
Open

ggbreak with y-axis position right (incompatible) #45

yaqinguo opened this issue Mar 24, 2022 · 0 comments

Comments

@yaqinguo
Copy link

can someone help me with ggbreak to set up y-axis on the right? When run the following, the y-axis title did not move to right side, but ticks changed to right side. However, if I remove sale_y_break, it works. But I need to both break and position on the right at the same plot.
ggplot(data,aes(x=x,y=t,fill=fill))+
geom_bar(stat = "identity",position = position_dodge(0.9),color="black")+
theme(axis.title.x = element_blank(),legend.title = element_blank(),legend.position ="none",
axis.title.y = element_blank(),
axis.ticks.x = element_blank(),axis.ticks.length.y = unit(-1.2, "mm"))+
scale_y_continuous(expand = c(0,0),limits = c(0,38),position = "right")+
scale_y_break(c(3,5),scales = 1,expand = F)

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

1 participant