Learn R Programming

movecost (version 3.0.0)

plot.movecost_paths: Plot least-cost paths

Description

Returns a ggplot object showing the DTM (terrain colours plus slope-shade), the least-cost path(s), the origin (black dot) and destination(s) (red dots), optionally labelled with the accumulated cost, and the return paths (dashed) if they were computed.

Usage

# S3 method for movecost_paths
plot(
  x,
  destin.lab = TRUE,
  cex.lcp.lab = 2.5,
  transp = 0.5,
  lcp.lwd = 0.3,
  plot.barrier = FALSE,
  ...
)

Value

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

Arguments

x

a movecost_paths object.

destin.lab

TRUE (default) or FALSE: label each destination with its accumulated cost.

cex.lcp.lab

size of the destination labels (2.5 by default).

transp

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

lcp.lwd

line width of the least-cost path(s) (0.3 by default; the return paths, if any, are drawn at 80% of this width).

plot.barrier

TRUE or FALSE (default): draw the barrier (blue) if one was used when building the surface.

...

unused.

See Also

mc_paths