rk.record.plot {rkward}R Documentation

Record screen device history and duplicate a screen device

Description

TODO TODO

Usage

rk.toggle.plot.history(x = TRUE)

rk.first.plot(devId = dev.cur())
rk.previous.plot(devId = dev.cur())
rk.next.plot(devId = dev.cur())
rk.last.plot(devId = dev.cur())
rk.goto.plot(devId = dev.cur(), index=1)

rk.force.append.plot(devId = dev.cur())
rk.removethis.plot(devId = dev.cur())

rk.clear.plot.history()

rk.show.plot.info(devId = dev.cur())
rk.plot.history.summary(which = NULL, type = c("devices", "history"))

rk.duplicate.device(devId = dev.cur())

Arguments

devId, which

an integer, the screen device on which an action is to be performed.

x

a logical (not NA), whether to enable the screen device history.

index

an integer, which plot to jump to?

type

a string, either "devices" or "history", the type of summary to be printed.

Details

TODO TODO

rk.record.plot is an environment to store the screen device history. You should not use the functions / variables in this environment directly, instead use the many wrapper functions as described below.

rk.toggle.plot.history enables or disables the screen device history. You should not use this function. Instead use the checkbox in Settings->Configure RKWard->Onscreen Graphics->Screen device history. After the needed initialization / clean up, it sets the option variable "rk.enable.graphics.history" to x.

rk.first.plot, rk.previous.plot, rk.next.plot, rk.last.plot these functions provide browing actions to respective plots saved in the history on the specified device (devId).

rk.goto.plot this function provides a one step jump action to the plot specified by index on the specified device (devId).

rk.force.append.plot forcefully append the currently displayed plot to the history. This function ignores the type of plot (graphics / lattice) and by-passes the general recording mechanism, as a result the plot call can not be identified.

rk.removethis.plot removes the plot displayed on the specified device from history. If there are more than one device showing the same plot then removing from one device does not wipe it from the other devices. They can be re-added to the history from the other devices.

rk.clear.plot.history clears the screen device history.

rk.show.plot.info when available, shows some extra information regarding the displayed plot on the specified device.

rk.plot.history.summary provides some summaries of the screen device history. type = "devices" provides summary of all or one device(s) depending on whether which = NULL or which is a single number identifying the device. type = "history" provides summary of the entire stored history.

rk.duplicate.device duplicates the specified screen device. The plot on the new device behaves independently of the one it was duplicated from.

Value

Except those mentioned below, the rest return NULL invisibly.

rk.plot.history.summary returns a data.frame with some messages.

rk.duplicate.device returns the value of a dev.copy call.

Warning

TODO TODO

Author(s)

Prasenjit Kapat rkward-devel@kde.org

See Also

recordPlot, replayPlot print.trellis, trellis.last.object rkward://page/rkward_plot_history

Examples

## Example for this?
require (rkward)

.L. <- getOption ("rk.graphics.hist.max.length")

local ({
 options ("rk.graphics.hist.max.length" = 150)
 x <- seq(-2*pi,2*pi,length=400)
 xlim <- range(x); ylim <- c(-1,1)
 n <- 100;
 for (i in seq_len (n)) {
   plot(x, sin(x-(i-1)*4*pi/n), type='l', xlim=xlim, ylim=ylim, 
        bty='n', xlab='', ylab='', xaxt='n', yaxt='n')
 }
})

rk.first.plot ()
for (i in 1:(rk.record.plot$sP.length-1)) rk.next.plot ()

## Not run
rk.clear.plot.history ()
options ("rk.graphics.hist.max.length" = .L.)


[Package rkward version 0.6.5 Index]