[R] geom_hline

From: Felipe Carrillo <mazatlanmexico_at_yahoo.com>
Date: Mon, 24 Dec 2007 10:01:17 -0800 (PST)

 Hi all:
I am trying to draw a horizontal line along the zero "Y axis" value but since zero isn't showing therefore the line is not drawn. If I set my intercept to 15 then it'll work but I dont want to hardcode it because the Y axis parameters could be different for another variable. I would like to alway set my hline along the zero as default. Thanks

p <- ggplot(mtcars, aes(x = wt, y=mpg)) + geom_point() p + geom_hline(intercept=0)

Felipe D. Carrillo
  Fishery Biologist
  US Fish & Wildlife Service
  California, USA

Looking for last minute shopping deals?

R-help_at_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. Received on Mon 24 Dec 2007 - 18:05:59 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 25 Dec 2007 - 10:30:20 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.