[R] How to plot several graphs in a single 2-D figure?
f0z6305 at labs.tamu.edu
Thu Apr 10 22:03:24 CEST 2003
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));
The result graph is messed up and x,y dont have consistent axis label
----- 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?
>plot(data1, xlim=xrange, ylim=yrange, pch=1)
> -----Original Message-----
> From: Feng Zhang [mailto:f0z6305 at labs.tamu.edu]
> Sent: Thursday, April 10, 2003 3:39 PM
> To: R-Help
> Subject: [R] How to plot several graphs in a single 2-D figure?
> Hi, R-listers
> I tried to plot several graphs in a sigle x-y coordinate
> settings, like the
> |(y) s
> | ****** s
> | ***** s
> | sssssssssssssssssss
> where "*" and "s" denote two diffrent plots.
> However, when I used
> plot(data1); % data1 is the data points of "*"
> plot(data2); % data2 is the data points of "s"
> I found that the x and y labels are messed up, since
> different graphs use
> diffrent unit length on the x-axis and y-axis.
> So is there someway to avoid this problem?
> Or is there some other function plottting multiple plots in
> one x-y axis setting?
> Thanks for your point and help.
> R-help at stat.math.ethz.ch mailing list
More information about the R-help