[R] Multi-plot
Ben Bolker
ben at zoo.ufl.edu
Tue Aug 20 17:01:27 CEST 2002
Create a new graphics window between plots.
You don't say what operating system you're using: for Unix, x11() is the
command to create a new window; for Windows, I believe it's windows() (see
?Devices).
Then see ?dev.cur() for information on how you can list, switch between
graphics windows, etc.
Q to gurus: is there a simple way to get the command for the default
graphics driver, something like options()$createdevice [options$device is
useful but "X11" can't quite be turned into x11() without some hacking,
and I don't know if that hack would work generally]. You can always write
a little bit of conditional code, but I'm just wondering if there's a
simple one-liner ...
Ben Bolker
On Tue, 20 Aug 2002, Enrico De Giorgi wrote:
> I'm working with the R-version 1.4.1.
> I've written a function whcih produces 4 plots.
> I would like to create 4 different windows, each of one with one plot.
> Now, all the 4 plots are created in the windows and only the last one
> remains.
>
>
> How can solve this problem?
>
> Regards,
> edg
>
> > -----Messaggio originale-----
> > Da: owner-r-help at stat.math.ethz.ch
> > [mailto:owner-r-help at stat.math.ethz.ch]Per conto di Jim Lemon
> > Inviato: martedì, 20. agosto 2002 14:02
> > A: r-help
> > Oggetto: Re: [R] plot and bg
> >
> >
> > Olivier Martin wrote:
> >
> > > Hi all,
> > >
> > > I would like to plot some points and define the bg color of my graphics.
> > > But the bg parameter set is defined for the. whole graphic.
> > > In fact, i would like to use something like :
> > >
> > > box(bg=gray(0.9)).
> > >
> > > So, the background concerns only the plot region and not the main
> > > title, the x title and the y title.
> > >
> >
> > This may not be the easiest way, but...
> >
> > > plot(1:5,type="n")
> > > pd<-par("usr")
> > > rect(pd[1],pd[3],pd[2],pd[4],col="Gray")
> > > par(new=T)
> > > plot(1:5)
> >
> > Jim
> > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
> > -.-.-.-.-.-.-
> > r-help mailing list -- Read
> > http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> > Send "info", "help", or "[un]subscribe"
> > (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
> > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
> > _._._._._._._
> >
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>
--
318 Carr Hall bolker at zoo.ufl.edu
Zoology Department, University of Florida http://www.zoo.ufl.edu/bolker
Box 118525 (ph) 352-392-5697
Gainesville, FL 32611-8525 (fax) 352-392-3704
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list