Learn R Programming

movecost (version 3.0.0)

plot.movecost_network: Plot a least-cost network

Description

Returns a ggplot object showing either the network of least-cost paths over the DTM (type = "paths", default) or the path-density raster (type = "density", available if the network was computed with density = TRUE).

Usage

# S3 method for movecost_network
plot(
  x,
  type = c("paths", "density"),
  transp = 0.5,
  lcp.lwd = 0.3,
  node.lab = TRUE,
  cex.node.lab = 3,
  ...
)

Value

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

Arguments

x

a movecost_network object.

type

"paths" (default) or "density".

transp

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

lcp.lwd

line width of the network paths (0.3 by default).

node.lab

TRUE (default) or FALSE: label each node with its index. The indices match the row and column names of the returned cost.matrix, so a node on the map can be related to its entries in the matrix (reproducing the behaviour of movecost <= 2.x).

cex.node.lab

size of the node labels (3 by default, in ggplot2 text-size units).

...

unused.

See Also

mc_network