On Dec 25, 2007 9:32 PM, ONKELINX, Thierry <[EMAIL PROTECTED]> wrote:
> Felipe,
>
> You'll need to define the limits yourself with scale_y_continuous.
>
> library(ggplot2)
> p <- ggplot(mtcars, aes(x = wt, y=mpg)) + geom_point()
> p + geom_hline(intercept=0) + scale_y_continuous(limits = c(0, 
> max(mtcars$mpg)))

Or

p + geom_hline(intercept=0) + scale_y_continuous(limits = c(0, NA))

-  the NA means that it will calculate the maximum from the data.

Hadley

-- 
http://had.co.nz/

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to