Re: [R] Weird but interesting behavior of ggplot2 in a loop

2014-07-18 Thread Jeff Newmiller
FAQ 7.16. ... yes, it applies. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. P

Re: [R] Weird but interesting behavior of ggplot2 in a loop

2014-07-18 Thread Dimitri Liakhovitski
I meant - the code I just sent doesn't give the file being printed a name... On Fri, Jul 18, 2014 at 7:05 PM, Dimitri Liakhovitski < dimitri.liakhovit...@gmail.com> wrote: > Thank you, but if I give my plot a name and then print it, how can I print > it with a desired name? > > png(forname1,wi

Re: [R] Weird but interesting behavior of ggplot2 in a loop

2014-07-18 Thread Dimitri Liakhovitski
Thank you, but if I give my plot a name and then print it, how can I print it with a desired name? png(forname1,width=700,height=450) print( ggplot(result.opt, aes(x=prices, y=demand))+ geom_line(colour='darkblue',size=1.2)+ scale_x_continuous(breaks=seq(input[1,1],input[nrow(input),1],

Re: [R] Weird but interesting behavior of ggplot2 in a loop

2014-07-18 Thread Sarah Goslee
Inside a loop or other function you need an explicit print statement. http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-do-lattice_002ftrellis-graphics-not-work_003f Sarah On Friday, July 18, 2014, Dimitri Liakhovitski < dimitri.liakhovit...@gmail.com> wrote: > Hello and sorry I am not providing