[R] How do I change which R Graphics Device is active?
(Ted Harding)
Ted.Harding at manchester.ac.uk
Tue Jun 30 19:33:43 CEST 2009
On 30-Jun-09 16:48:15, Barry Rowlingson wrote:
> To keep track, call dev.cur() after creating a new plot
> and assign it to something memorable. Here's how to keep
> a histogram and an xy plot:
>
>> dev.new();histPlot = dev.cur()
>> dev.new();xyPlot = dev.cur()
>> dev.set(histPlot);hist(runif(100))
> X11cairo
> 2
>> dev.set(xyPlot);plot(1:10)
> X11cairo
> 3
>
> You just have to remember to call dev.set before your particular plot.
>
> Barry
Barry, spot on! If there were a prize for postings with
simplicity, clarity, conciseness and usability, I would nominate
yours (especially in the "Why didn't *I* think of that?" category).
Cheers,
Ted.
--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at manchester.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 30-Jun-09 Time: 18:33:40
------------------------------ XFMail ------------------------------
More information about the R-help
mailing list