[R] ggplot2 package: argument of expand with scale_x_discrete()
Fix Ace
acefix at rocketmail.com
Thu Dec 29 15:59:18 CET 2016
Hello, there,
What exactly does "expand" do for this function?
I followed the examples from the manual to get a plot:
d <- ggplot(subset(diamonds, carat > 1), aes(cut, clarity)) +geom_jitter()
I would like to have all the dots in a square instead of rectangular range. When I applied d + scale_x_discrete(expand=c(1,1)) and d + scale_x_discrete(expand=c(1,0)), I got the same plot (different from the original one though).
Could anyone help me to figure out how to use this argument?
Thank you very much!
Ace
[[alternative HTML version deleted]]
More information about the R-help
mailing list