playPrompt {playwith} | R Documentation |
Part of the playwith
Application Programming Interface.
playPrompt(playState, text = NULL) playFreezeGUI(playState) playThawGUI(playState) blockRedraws(expr, playState = playDevCur())
playState |
a playState object representing the plot, window and device. |
text |
text to display to the user, or NULL to hide the prompt. |
expr |
an expression to evaluate without redrawing or resizing the plot. |
The 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).
nothing interesting.
Felix Andrews felix@nfrac.org
if (interactive()) { playwith(plot(1:10)) playPrompt(playDevCur(), "Click to place a new point.") points(locator(n=1), col=2) playPrompt(playDevCur(), NULL) }