playDev {playwith} | R Documentation |
Part of the playwith
Application Programming Interface.
playDevCur() playDevList() playDevSet(playState) playDevOff(playState = playDevCur())
playState |
a playState object representing the plot, window and device. |
These are analogous to dev.cur
, dev.list
,
dev.set
and dev.off
, and do in fact call these
lower-level functions. Specifically, it is recommended to call
playDevSet(playState)
before any direct drawing operations, to
ensure that this is the current graphics device.
playDevCur
returns the currently active playState
object.
playDevList
returns a list of playState
objects for all open playwith
plot windows.
Felix Andrews felix@nfrac.org
if (interactive()) { playwith(plot(1:10)) play.first <- playDevCur() playwith(plot(20:1), new=TRUE) ## show the first window again playDevSet(play.first) playDevCur() ## replace it playwith(plot(1:100)) playDevList() ## clean up playDevOff() invisible(lapply(playDevList(), playDevOff)) }