autozoom {paletteknife}R Documentation

Auto Zoom to Create a Dynamic Plot

Description

Replaces plot() with an interactive loop which allows user to click twice on the plot window to redraw with new limits. Press ESCAPE to finish.

Usage

autozoom(x, ..., after = NULL)

Arguments

x

Passed directly to plot()

...

Passed directly to plot()

after

An expression to be executed after each plot is drawn

Details

Click twice to set the new plot extents. If both clicks are on one of the axis (outside of the plot area) then only this axis is zoomed. Click twice on the same spot to reset the zoom to the entire plot.

Extras such as axes or legends are added using the after argument.

Examples

## Not run: 
autozoom(airmiles)

autozoom(faithful, cex=runif(272), after={autoaxis(3); autoaxis(4)})

autozoom(faithful, col=autocol(runif(272)), pch=16,
  after=autolegend('above') )

## End(Not run)


[Package paletteknife version 0.4.2 Index]