Learn R Programming

SpatialPosition (version 1.0)

plotReilly: Plot a Reilly Raster

Description

This function plots the raster produced by the rasterReilly function.

Usage

plotReilly(x, add = FALSE, col = rainbow)

Arguments

x
raster; output of the rasterReilly function.
add
logical; if TRUE the raster is added to the current plot, if FALSE the raster is displayed in a new plot.
col
function; color ramp function, such as colorRampPalette.

Details

Display the raster nicely.

See Also

reilly, rasterReilly, plotReilly, CreateGrid, CreateDistMatrix.

Examples

Run this code
data(spatData)
row.names(spatPts) <- spatPts$CodHop
# Compute Reilly catchment areas from known points (spatPts) on a
# grid defined by its resolution
myreilly <- reilly(knownpts = spatPts, varname = "Capacite",
                   typefct = "exponential", span = 750, beta = 2,
                   resolution = 50, longlat = FALSE, mask = spatMask)
# Create a raster of reilly values
myreillyraster <- rasterReilly(x = myreilly, mask = spatMask)
# Plot the raster nicely
plotReilly(x = myreillyraster)

Run the code above in your browser using DataLab