Skip to content
Prev 30439 / 398513 Next

How to plot several graphs in a single 2-D figure?

Thanks, Iyue

But here the data1 and data2 are not necessarily two vectors.
Maybe they are results from some other functions, defined
as a data structure.
Like using norMix package,

x <- norMix(mu=c(-1,0,1.5),sig2=c(.49,.36,.16),w=c(.4,.3,.3));
plot(x); %% x is not a vector, but a structure
y <- norMix(mu=c(-2,0,2),sig2=c(.16,.36,.64),w=c(.4,.3,.3));
par(new=T);
plot(y);

The result graph is messed up and x,y dont have consistent axis label
settings.

Fred

----- Original Message -----
From: "Iyue Sung" <isung at epidemiology.com>
To: "Feng Zhang" <f0z6305 at labs.tamu.edu>
Sent: Thursday, April 10, 2003 2:55 PM
Subject: RE: [R] How to plot several graphs in a single 2-D figure?



Fred, Try:
-Iyue