plotStewart: Plot a Stewart Raster

Description Usage Arguments Value See Also Examples

View source: R/stewart.R

Description

This function plots the raster produced by the rasterStewart function.

Usage

1
2
plotStewart(x, add = FALSE, breaks = NULL, typec = "equal", nclass = 5,
  legend.rnd = 0, col = colorRampPalette(c("#FEA3A3", "#980000")))

Arguments

x

raster; output of the rasterStewart function.

add

logical; if TRUE the raster is added to the current plot, if FALSE the raster is displayed in a new plot.

breaks

numeric; vector of break values to map. If used, this parameter overrides typec and nclass parameters

typec

character; either "equal" or "quantile", how to discretize the values.

nclass

numeric (integer), number of classes.

legend.rnd

numeric (integer); number of digits used to round the values displayed in the legend.

col

function; color ramp function, such as colorRampPalette.

Value

Display the raster nicely and return the list of break values (invisible).

See Also

stewart, rasterStewart, quickStewart, rasterToContourPoly, CreateGrid, CreateDistMatrix.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data(spatData)
# Compute Stewart potentials from known points (spatPts) on a
# grid defined by its resolution
mystewart <- stewart(knownpts = spatPts, varname = "Capacite",
                     typefct = "exponential", span = 1000, beta = 3,
                     resolution = 100, mask = spatMask)
# Create a raster of potentials values
mystewartraster <- rasterStewart(x = mystewart, mask = spatMask)
# Plot stewart potentials nicely
plotStewart(x = mystewartraster, add = FALSE, nclass = 5)
# Can be used to obtain break values
break.values <- plotStewart(x = mystewartraster, add = FALSE, nclass = 5)
break.values

SpatialPosition documentation built on Sept. 6, 2017, 5:04 p.m.