Learn R Programming

SpatialPosition (version 1.0)

plotHuff: Plot a Huff Raster

Description

This function plots the raster produced by the rasterHuff function.

Usage

plotHuff(x, add = FALSE)

Arguments

x
raster; output of the rasterHuff function.
add
logical; if TRUE the raster is added to the current plot, if FALSE the raster is displayed in a new plot.

Value

  • Display the raster nicely.

See Also

huff, rasterHuff, plotHuff, CreateGrid, CreateDistMatrix.

Examples

Run this code
data(spatData)
# Compute Huff catchment areas from known points (spatPts) on a
# grid defined by its resolution
myhuff <- huff(knownpts = spatPts, varname = "Capacite",
               typefct = "exponential", span = 750, beta = 2,
               resolution = 50, longlat = FALSE, mask = spatMask)
# Create a raster of huff values
myhuffraster <- rasterHuff(x = myhuff, mask = spatMask)
# Plot Huff values nicely
plotHuff(x = myhuffraster)

Run the code above in your browser using DataLab