[R] More Plots

John Kane jrkrideau at yahoo.ca
Tue Aug 8 20:59:10 CEST 2006


--- sonal at deepfoo.com wrote:

> Hi,
> 
> How can we plot two graphs ex. lets say correlation
> & ratio in the same 
> window?
> 
> I mean in the window I have :
> 
> 1. Graph of correlation having X & Y axes
> 
> 2. Graph of ratio having A & B axes
> 
> one above the other.
> 
> Thanks,
> Sonal


?par
and have a look at mfcol or mfrow.

Example

a <- c(1:5)
b <- c(11:15)
x <- c(21:30)
y <- c(31:40)

par(mfcol=c(2,1))
plot(a,b)
plot (x,y)



More information about the R-help mailing list