[R] geom_hline

Felipe Carrillo mazatlanmexico at yahoo.com
Mon Dec 24 19:01:17 CET 2007


 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?



More information about the R-help mailing list