playDev {playwith}R Documentation

Work with the playwith device

Description

Part of the playwith Application Programming Interface.

Usage

playDevCur()
playDevList()
playDevSet(playState)
playDevOff(playState = playDevCur())

Arguments

playState a playState object representing the plot, window and device.

Details

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.

Value

playDevCur returns the currently active playState object.
playDevList returns a list of playState objects for all open playwith plot windows.

Author(s)

Felix Andrews felix@nfrac.org

See Also

playwith.API

Examples

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))

}

[Package playwith version 0.8.51 Index]