[R] QQplots format

arun smartpink111 at yahoo.com
Fri May 11 05:14:10 CEST 2012


HI Michael,

It worked.

Thanks.

A.K.


----- Original Message -----
From: R. Michael Weylandt <michael.weylandt at gmail.com>
To: arun <smartpink111 at yahoo.com>
Cc: R help <r-help at r-project.org>
Sent: Wednesday, May 9, 2012 11:32 PM
Subject: Re: [R] QQplots format

Hi,

car uses base graphics for this plot, so you can probably get what you
want with the layout() function. These aren't grid graphics so print()
is not at all helpful to you here.

e.g.,

x <- rnorm(50)
y <- rcauchy(50)

dev.new()
layout(matrix(1:2, nrow = 1))
qqPlot(x)
qqPlot(y)

dev.new()
layout(matrix(1:2, ncol = 1))
qqPlot(x)
qqPlot(y)

Take a look at ? layout

Hope this helps,
Michael

On Wed, May 9, 2012 at 11:13 PM, arun <smartpink111 at yahoo.com> wrote:
> HI Michael,
>
> Thanks for the reply.  The qqPlot is from library car.  I could use par(), but I thought by adding pos(), it will me more control.
> A.K.
>
>
>
>
> ----- Original Message -----
> From: R. Michael Weylandt <michael.weylandt at gmail.com>
> To: arun <smartpink111 at yahoo.com>
> Cc: R help <r-help at r-project.org>
> Sent: Wednesday, May 9, 2012 10:19 PM
> Subject: Re: [R] QQplots format
>
> What package is "qqPlot" from? There are at least two that provide a
> function by that name.
>
> If you're using grid graphics, this might get you started:
> http://gettinggeneticsdone.blogspot.com/2010/03/arrange-multiple-ggplot2-plots-in-same.html
>
> Michael
>
> On Wed, May 9, 2012 at 6:47 PM, arun <smartpink111 at yahoo.com> wrote:
>> Dear R help,
>>
>> I tried to plot two qq plots in the same window using the code below.  Somehow it is plotting only one at a time.   I borrowed the print function from xyplot.
>>
>>
>>
>>
>> pdf("QQplotCorrUncorr.pdf")
>> qq1<-qqPlot(residuals(fm), main="QQ plot for Correlated Model")
>> qq2 <-qqPlot(residuals(fma), main="QQ plot for Uncorrelated Model")
>> print(qq1, pos = c(0.0, 0.0, 0.5, 0.5), more = TRUE)
>> print(qq2, pos = c(0.5, 0.5, 1, 1), more = FALSE )
>>
>>
>>  dev.off()
>>
>> Help will be appreciated.
>> Thanks,
>>
>>
>> A.K.
>>
>>
>> ______________________________________________
>> 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