[R] ggplot and xlim/ylim

jiho jo.irisson at gmail.com
Thu Sep 20 15:28:08 CEST 2007


Hello everyone,

I am (happily) using ggplot2 for all my plotting now and I wondered  
is there is an easy way to specify xlim and ylim somewhere when using  
the ggplot syntax, as opposed to the qplot syntax. Eg.

  qplot(data=mtcars,y=wt, x=qsec,xlim=c(0,30))

<->

ggplot(mtcars, aes(y=wt, x=qsec)) + geom_point() + ???

Indeed the ggplot syntax is in general more flexible and powerful and  
I usually rely on it in scripts. It would be nice to know how to use  
xlim/ylim with this syntax.

Thank you in advance.

JiHO
---
http://jo.irisson.free.fr/



More information about the R-help mailing list