ggplot2 geom_abline slope not working?
I am learning ggplot2, and need your help. When I try
p <- ggplot(mtcars, aes(x = wt, y=mpg)) + geom_point() p + geom_abline(slope=5)
(from http://had.co.nz/ggplot2/geom_abline.html) the slope of the abline does not change, but this works:
p + geom_abline(intercept=20)
In order to have slope work, I have to use
p + geom_abline(aes(slope=5))
Is it a bug, or is there some reason slope and intercept were treated differently? Thank you very much in advance for your clarification.
View this message in context: http://www.nabble.com/ggplot2-geom_abline-slope-not-working--tf4770727.html#a13646422 Sent from the R help mailing list archive at Nabble.com.