Learn R Programming

movecost (version 3.0.0)

plot.movecost_accum: Plot an accumulated cost surface

Description

Returns a ggplot object showing the accumulated cost surface with isolines and origin location(s), or the isolines alone (type = "contour"), reproducing the two output types of movecost <= 2.x's outp parameter - but on demand, without re-running the analysis.

Usage

# S3 method for movecost_accum
plot(
  x,
  type = c("raster", "contour"),
  cont.lab = TRUE,
  transp = 0.5,
  cex.breaks = 2.5,
  iso.col = "white",
  iso.lwd = 0.3,
  ...
)

Value

A ggplot object (draw it by printing; customise it with +).

Arguments

x

a movecost_accum object.

type

"raster" (default; accumulated surface, slope-shade, isolines) or "contour" (isolines only).

cont.lab

TRUE (default) or FALSE: label the isolines.

transp

transparency of the slope-shade overlay (0.5 by default).

cex.breaks

size of the isoline labels (2.5 by default, in ggplot2 text-size units).

iso.col

colour of the isolines and their labels (default "white", which reads clearly against the dark low-cost core of the viridis "C" palette; over the "contour" output, where there is no coloured background, "grey20" is used automatically unless the user overrides iso.col).

iso.lwd

line width of the isolines (0.3 by default).

...

unused.

See Also

mc_accum