playwith
Application Programming Interface.playPrompt(playState, text = NULL)
playFreezeGUI(playState)
playThawGUI(playState)
blockRedraws(expr, playState = playDevCur())
playState
object representing the plot, window and device.NULL
to hide the prompt.playwith
plot window can show a simple plot to the user. It is shown in the place
normally occupied by the "call toolbar" (the top-most toolbar in the window).
When the prompt is shown, all the toolbars and controls in the window are disabled.
When the prompt is removed, the toolbars and controls are restored.
When a plot is redrawn (with playReplot
), the prompt is automatically removed.
The other functions described here are only rarely useful:
playFreezeGUI
disables all the toolbars and controls, and
playThawGUI
restores them.
blockRedraws
is a wrapper around code that prevents the plot from being redrawn
(typically as a result of resizing the plot area).playwith.API
if (interactive()) {
playwith(plot(1:10))
playPrompt(playDevCur(), "Click to place a new point.")
points(locator(n=1), col=2)
playPrompt(playDevCur(), NULL)
}
Run the code above in your browser using DataLab