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

modify scale of axis in ggplot2 plots #3

Open
niederle opened this issue Jan 15, 2014 · 0 comments
Open

modify scale of axis in ggplot2 plots #3

niederle opened this issue Jan 15, 2014 · 0 comments

Comments

@niederle
Copy link
Collaborator

I would like to fix the y axis scale on Bar plot template, but that doesnt seem to be so easy.
Something like
p <- p + scale_y_continuous(limits=c(0,8000))
print(p) # or last_plot() + ylim(0,1000)
is possible but if the limits are smaller of what is plotted then that bar or error bar is not plotted at all.

E.g. plotting bars that vary between 95% and 105% doesnt look nice because the ggplot2 auto scale is set to 0 - ~110, whereas a scale of 90 - 110 would be much better to show difference in this smaller range.

I tried several things, went to forums and gglot2 descriptions, and found that others had same difficulties to manipulate the axes, and somehow I couldnt establish a way to handle flexible/manual axis scale for the Bar plot template. I think for factorized density plot and others it is a similar problem!?

(Martin)

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

No branches or pull requests

1 participant