Learn R Programming

berryFunctions (version 1.4)

pointZoom: zoom in originally static x11 graphics

Description

zoom in x11 graphics - uses locator to define region to zoom into

Usage

pointZoom(x, y=NA, z=NA, Time=1, steps=30, las=1, colp=FALSE,
xlab=substitute(x), ylab=substitute(y), notify=TRUE, ...)

Arguments

x
same x coordinates as in current plot. x can be a matrix, then the y (and z) coordinates are taken from the second (and third) column.
y
ditto
z
if using colpoints, z-value
Time
Duration of zooming (speed) in seconds. DEFAULT: 1
steps
number of single zoomlevels. DEFAULT: 30
las
label axis style, see par. DEFAULT: 1
colp
logical: use colPoints when zooming? DEFAULT: FALSE
xlab
xlabel See plot. DEFAULT: substitute(x)
ylab
dito
notify
logical. Should notifications (instructions) be written to the console? DEFAULT: TRUE
...
further arguments passed to plot or colpoints.

Value

  • none, works in existing graphics

See Also

shapeZoom, colPoints, locator

Examples

Run this code
## Examples rely on locator, so can't be checked in non-interactive R use.
a <- rnorm(90); b <- rexp(90)
windows(record=TRUE) # turn recording on
plot(a,b, las=1)
pointZoom(a,b)
# now scroll through the plots (Pg Up and Pg Dn) to unzoom again.

d <- data.frame(a,b)
class(d)
plot(d)
pointZoom(d)

Run the code above in your browser using DataLab