Re: [R] ggplot inside cycle

2010-08-26 Thread Petr PIKAL
Thanks. I knew I forgot something obvious. Petr r-help-boun...@r-project.org napsal dne 26.08.2010 12:29:52: > You haven't wrapped p in the print command, which is one of the ways to > make sure the plot gets printed when we need it. > print(p+geom_point(aes(size=3))) does the trick > On 08/

Re: [R] ggplot inside cycle

2010-08-26 Thread Abhijit Dasgupta, PhD
You haven't wrapped p in the print command, which is one of the ways to make sure the plot gets printed when we need it. print(p+geom_point(aes(size=3))) does the trick On 08/26/2010 06:08 AM, Petr PIKAL wrote: Dear all I want to save several ggplots in one pdf document. I tried this for (i

[R] ggplot inside cycle

2010-08-26 Thread Petr PIKAL
Dear all I want to save several ggplots in one pdf document. I tried this for (i in names(iris)[2:4]) { p<-ggplot(iris, aes(x=Sepal.Length, y=iris[,i], colour=Species)) p+geom_point(aes(size=3)) } with different variations of y input but was not successful. In past I used qplot in similar fashi