[R] How to draw several plots in one figure?

Jeremy Z Butler jerrytheshrub at hotmail.com
Wed Mar 5 08:13:59 CET 2003


One way is to make inital plot:
>plot()
Then build other data into the plot using:

lines()
points()
etc.
see help files for those

Alternatively:

set par(new=T)
then plot again and the device wont be cleared
J.




>From: "Feng Zhang" <f0z6305 at labs.tamu.edu>
>To: "Steve Su" <s.su at qut.edu.au>
>CC: R-Help <r-help at stat.math.ethz.ch>
>Subject: Re: [R] How to draw several plots in one figure?
>Date: Wed, 5 Mar 2003 00:35:00 -0600
>
>Thanks, Su.
>
>But I want to plot the several plots in the same
>x-y axis setting, not in multiple subplots.
>----- Original Message -----
>From: "Steve Su" <s.su at qut.edu.au>
>To: "Feng Zhang" <f0z6305 at labs.tamu.edu>
>Sent: Wednesday, March 05, 2003 12:29 AM
>Subject: Re: [R] How to draw several plots in one figure?
>
>
> > Dear Fred,
> >
> > try par(mfrow=c(2,2)) for example, gives four plots per page. Also try
> > trellis plots.
> >
> > Steve.
> >
> >
> > ----- Original Message -----
> > From: "Feng Zhang" <f0z6305 at labs.tamu.edu>
> > To: "R-Help" <r-help at stat.math.ethz.ch>
> > Sent: Wednesday, March 05, 2003 4:05 PM
> > Subject: [R] How to draw several plots in one figure?
> >
> >
> > > Hey,
> > >
> > > I want to draw several plots sequently, but have to make them dispaly 
>in
> > one
> > > figure.
> > > So how to achieve this?
> > >
> > > Thanks.
> > >
> > > Fred
> > >
> > > ______________________________________________
> > > R-help at stat.math.ethz.ch mailing list
> > > http://www.stat.math.ethz.ch/mailman/listinfo/r-help
> >
>
>______________________________________________
>R-help at stat.math.ethz.ch mailing list
>http://www.stat.math.ethz.ch/mailman/listinfo/r-help



More information about the R-help mailing list