[R] Display more than one plot
joris meys
jorismeys at gmail.com
Sun Oct 11 00:54:10 CEST 2009
Just saw I did something stupid. Both examples create a 2 by 2 grid in
your graph window, so you'll be able to plot 4 graphs in that window.
If you plot only 2 graphs, the lower half of the window will be empty
still. Just check the helpfiles and experiment a bit to get a grip of
how to get which graph where. It's pretty straight forward.
Kind regards
Joris
On Sun, Oct 11, 2009 at 12:50 AM, joris meys <jorismeys at gmail.com> wrote:
> Hi Emkay,
>
> If you want to look at different plots together, you can also plot
> them side by side in the same plot window.
>
> You can specify this using for example:
> par(mfcol=c(2,2))
> ( see ?par and check mfrow and mfcol)
> or
> layout(matrix(1:4,2,2))
> (see ?layout and ?matrix)
>
> eg :
> x <- c(1,2,3,4,5,6,7,8,9,0)
> y <- c(1,2,3,4,5,6,7,8,9,0)
> z <- c(8,7,6,5,4,3,2,1,0,9)
>
> par(mfcol=c(2,2))
> plot(x,y)
> plot(x,z)
>
> Kind regards
> Joris
>
> On Sat, Oct 10, 2009 at 4:51 AM, emkayenne
> <michaelkristoffernagl at gmail.com> wrote:
>>
>> Nobody? :-(
>>
>> emkayenne wrote:
>>>
>>> Hello, I'm pretty new to R and I am having a hrd time getting a grip. Just
>>> a question: can someone tell me how to have more than one graphics windown
>>> open at the same time? I want to look at some plote at the same time...,
>>> how is this done? If someone has a suggestion for a (good) introductory
>>> guide to R, much appreciated, but not the manual..., this one I do have.
>>> :confused:
>>> Thank you for your help guys, Emkay
>>>
>>
>> --
>> View this message in context: http://www.nabble.com/Display-more-than-one-plot-tp25829214p25830526.html
>> Sent from the R help mailing list archive at Nabble.com.
>>
>> ______________________________________________
>> 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.
>>
>
More information about the R-help
mailing list