a simple question how does one produce plots on two different graphics devices? / allan
Alan,
I'm not sure what you mean...
perhaps
plot(y~x) # to the screen
pdf("myplot.pdf")
plot(y~x) # write the plot to the file
dev.off() # close the file
dev.off() # close the graphics window
s/
On 29/07/05, Clark Allan <Allan at stats.uct.ac.za>
wrote:> a simple question
>
> how does one produce plots on two different graphics devices?
>
> /
> allan
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html
>
>
Eventually one way: With X11() you can open additional graphic devices. x <- rnorm(100) y <- x + runif(100) plot(x) X11() plot(x,y) Best, Matthias> > a simple question > > how does one produce plots on two different graphics devices? > > / > allan >
Hi Allan, in case of many plots in the same window you can try this: options(graphics.record=TRUE) plot(x) plot(x,y) with PgUp and PgDn you check both in the same window. I hope this helps. Roula ================Spyridoula Tsonaka Doctoral Student Biostatistical Centre Catholic University of Leuven Kapucijnenvoer 35 B-3000 Leuven Belgium Tel: +32/16/336899 Fax: +32/16/337015 ----- Original Message ----- From: "Clark Allan" <Allan at STATS.uct.ac.za> To: <r-help at stat.math.ethz.ch> Sent: Friday, July 29, 2005 1:30 PM Subject: [R] R: graphics devices>a simple question > > how does one produce plots on two different graphics devices? > > / > allan--------------------------------------------------------------------------------> ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html
That's interesting,how can I see the help document of "graphics.record" option? I use ?options ,but can not find anything about it.>Hi Allan, > >in case of many plots in the same window you can try this: > >options(graphics.record=TRUE) >plot(x) >plot(x,y) > >with PgUp and PgDn you check both in the same window. > >I hope this helps. > >Roula > >================>Spyridoula Tsonaka >Doctoral Student >Biostatistical Centre >Catholic University of Leuven >Kapucijnenvoer 35 >B-3000 Leuven >Belgium >Tel: +32/16/336899 >Fax: +32/16/337015 > > >----- Original Message ----- >From: "Clark Allan" <Allan at STATS.uct.ac.za> >To: <r-help at stat.math.ethz.ch> >Sent: Friday, July 29, 2005 1:30 PM >Subject: [R] R: graphics devices > > >>a simple question >> >> how does one produce plots on two different graphics devices? >> >> / >> allan2005-07-29 ------ Deparment of Sociology Fudan University Blog:http://sociology.yculblog.com
I'd suggest starting with the documentation. See
?Devices
and then look at some of the other functions referenced in the "See
Also" section of ?Devices.
Basically, you produce plots on two different graphics devices by
this sequence:
1) open a graphics device
2) produce a plot
3) open another graphics device
4) produce a plot
and depending on which graphic device(s) you are using you may have
follow with dev.off() to actually get any useful result.
And of course there is always the documentation you can download from
the R website. Specifically, the one titled
"An Introduction to R"
in which I found a section titled
"Multiple graphics devices"
which starts with
"In advanced use of R it is often useful to have several graphics
devices in use at the same time."
(this was from the R 2.0.1 version of the manual, to be precise)
-Don
At 1:30 PM +0200 7/29/05, Clark Allan wrote:>a simple question
>
>how does one produce plots on two different graphics devices?
>
>/
>allan
>______________________________________________
>R-help at stat.math.ethz.ch mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html
--
--------------------------------------
Don MacQueen
Environmental Protection Department
Lawrence Livermore National Laboratory
Livermore, CA, USA