[R] Help! I couldn't put multiple qplot on the same page...

Michael comtech.usa at gmail.com
Thu Dec 8 00:29:31 CET 2011


Still the same problem - in the final aggregated plots, all the titles
are diffrent(which is good), but the curve shapes are the same...

How could this happen?

Is this a bug?

On 12/7/11, Tengfei Yin <yintengfei at gmail.com> wrote:
> library(gridExtra)
> ?grid.arrange
>
> I found this function convenient to me, it could arrange multiple ggplot
> object on the same view window
> p1 <- qplot(...)
> p2 <- qplot(...)
> ....
> grid.arrange(p1, p2, ..., nrow = 2)
>
> different from your design, but for the same purpose I guess.
>
> cheers
>
> Tengfei
>
> On Wed, Dec 7, 2011 at 5:08 PM, Michael <comtech.usa at gmail.com> wrote:
>
>> Thanks a lot!
>>
>> Now I can see the individual plot, but still not the
>> originally-desired multi-plot-on-one-page?
>>
>> Any thoughts? Thanks again!
>>
>> On 12/7/11, Yihui Xie <xie at yihui.name> wrote:
>> > This is probably one of the most frequently asked questions. The
>> > answer is to print() the objects. See R FAQ 7.22.
>> >
>> >
>> http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-do-lattice_002ftrellis-graphics-not-work_003f
>> >
>> > Regards,
>> > Yihui
>> > --
>> > Yihui Xie <xieyihui at gmail.com>
>> > Phone: 515-294-2465 Web: http://yihui.name
>> > Department of Statistics, Iowa State University
>> > 2215 Snedecor Hall, Ames, IA
>> >
>> >
>> >
>> > On Wed, Dec 7, 2011 at 4:38 PM, Michael <comtech.usa at gmail.com> wrote:
>> >> I found that if I run each "qplot" manually it would plot out
>> something...
>> >>
>> >> but if I put it into the loop,
>> >>
>> >> it just doesn't work at all - sometimes it refused to plot anything...
>> >>
>> >
>>
>> ______________________________________________
>> 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.
>>
>
>
>
> --
> Tengfei Yin
> MCDB PhD student
> 1620 Howe Hall, 2274,
> Iowa State University
> Ames, IA,50011-2274
> Homepage: www.tengfei.name
>



More information about the R-help mailing list