Learn R Programming

GISTools (version 0.7-4)

level.plot: Level plot for gridded data

Description

Draws a level plot given a SpatialPixelsDataFrame, an index and a shading scheme.

Usage

level.plot(grd, shades, index=1, add=FALSE)

Arguments

grd
A spatialPixelsDataFrame object.
shades
A shading scheme created by shading or auto.shading. If omitted, chosen automatically from grd.
index
Index giving the variable in grd to plot.
add
Whether to add the level plot to an existing plot.

Value

None (see above).

Details

The function returns no value, but draws a level plot on the current graphics device as a side effect.

Examples

Run this code
# Data for New Haven to use in example
data(newhaven)
# Do the KDE
breach.dens = kde.points(breach,lims=tracts)
# Plot the result
level.plot(breach.dens)
# Block out the part outside the study area
masker = poly.outer(breach.dens,tracts,extend=100); add.masking(masker)
# Plot census tract boundaries
plot(tracts,add=TRUE)

Run the code above in your browser using DataLab