Learn R Programming

playwith (version 0.8-56)

playReplot: Draw a playwith plot

Description

Part of the playwith Application Programming Interface.

Usage

playNewPlot(playState)
playReplot(playState)

Arguments

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

Value

  • the result of the plot call.

Details

playReplot actually draws the plot on the graphics device and runs the post-plot actions associated with interface tools. It also stores information about the plot spaces (associated with viewports -- see playDo). playNewPlot is the same but also rebuilds all the toolbars, and thus runs all the tool constructor functions. If only arguments to the plot call have changed, calling playReplot should be enough. If the high-level plot function has changed, or data has changed, you should call playNewPlot, because some tools will need to initialise themselves depending on the type of plot and data.

See Also

playwith.API

Examples

Run this code
if (interactive()) {

playwith(plot(1:10))
playState <- playDevCur()
playState$call <- quote(plot(c(10:1, 1:10)))
playNewPlot(playState)

}

Run the code above in your browser using DataLab