zoom: Zooming in and out in a 2d-Plot

Description Usage Arguments Details Value Author(s) Examples

Description

Function to zoom in and out by mouse click in a 2D-plot.

Usage

1
zoom(fun = plot, zoom.col = "red", delay = 3, ...)

Arguments

fun

2D-plotting function

zoom.col

Color of clicked points

delay

Number of sec during which the 2 zooming points are shown on the plot before zooming

...

Arguments to plotting function

Details

When the clicked points lay within the plot region range, the points define the new plotting limits. When the clicked points lay in the margin, the plotting limits will be moved into the corresponding direction by 1/3 out of the actual range. There is no special sequential order for the zooming points required. The zooming function is stopped by right clicking and choosing the menu item "stop".

Value

No value returned.

Author(s)

Rene Locher

Examples

1
2
3
4
5
6
7
i <- 1:100
y <- i*sin(i*(pi/16))
y <- c(rev(y),y)

## Not run:
zoom(fun=plot, zoom.col="red", x=1:200, y=y, type="l", xlab="index")
## End( Not run)


Search within the IDPmisc package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.