[R] How do I change which R Graphics Device is active?

Mark Knecht markknecht at gmail.com
Tue Jun 30 18:25:09 CEST 2009


Thanks milton! Beautiful!

Cheers,
Mark

On Tue, Jun 30, 2009 at 9:15 AM, milton ruser<milton.ruser at gmail.com> wrote:
> How about:
>
> dev.cur()
> dev.list()
> dev.next(which = dev.cur())
> dev.prev(which = dev.cur())
> dev.off(which = dev.cur())
> dev.set(which = dev.next())
> dev.new(...)
> graphics.off()
> dev.cur()
> dev.list()
> dev.next(which = dev.cur())
> dev.prev(which = dev.cur())
> dev.off(which = dev.cur())
> dev.set(which = dev.next())
> dev.new(...)
> graphics.off()
> :-) bests
>
> milton
>
> On Tue, Jun 30, 2009 at 12:07 PM, Mark Knecht <markknecht at gmail.com> wrote:
>>
>> Hello,
>>   If I execute
>>
>> X11()
>> plot( stuff )
>> X11()
>> plot( other stuff)
>>
>> then at this point I have two windows with plots and the second
>> graphics window is active. I don't see the devices using ls().
>>
>> 1) Without destroying the second window how do I make the first window
>> active again?
>> 2) How do I destroy a specific window when I'm done with it?
>> 3) Is there some generic way to understand what windows are out there
>> at any given time or do I need to create some sort of list and keep
>> track of it myself?
>>
>> In general I'd like to have 4 or 5 windows and be able to switch and
>> update individual plots as the needs arise. Is there a way to name
>> these devices/windows? I don't see any examples of this sort of thing
>> in the help file. Maybe there's a different add-on package I don't yet
>> know about?
>>
>> Thanks,
>> Mark
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>
>




More information about the R-help mailing list