zoom {IDPmisc} | R Documentation |
Function to zoom in and out in a 2D-plot.
zoom(fun = usa, zoom.col = "red", delay = 3, ...)
fun |
Plotting function |
zoom.col |
Color of clicked points |
delay |
Number of sec during which the 2nd zooming point is shown before zooming |
... |
Aditional arguments for plotting function |
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".
Rene Locher
x <- 1:100 y <- x*sin(x*(pi/16)) y <- c(rev(y),y) if(dev.interactive()) zoom(fun=plot, ty="l", x=y)