Learn R Programming

berryFunctions (version 1.4)

shapeZoom: zoom into ESRI shapefiles

Description

uses locator to define zooming area

Usage

shapeZoom(shp, Time = 3, steps = 3, ...)

Arguments

shp
Shapefile Object.
Time
Duration of zooming (speed) in seconds.. DEFAULT:5
steps
number of single zoomlevels. DEFAULT:2
...
Further arguments passed to plot.

Value

  • None - only plots

See Also

pointZoom for simple scatterplots. changeAttribute and showAttribute for more Shapefile-related operations

Examples

Run this code
library(maptools) # for readShapeSpatial and dataset
xx <- readShapeLines(system.file("shapes/fylk-val.shp", package="maptools")[1],
                     proj4string=CRS("+proj=utm +zone=33 +datum=WGS84"))

windows(record=TRUE)
plot(xx)
shapeZoom(xx)
# With pgUp and Dn, you can zoom out again

plot(xx)
shapeZoom(xx, steps=8)

Run the code above in your browser using DataLab