draw_elev2D_OCN: Plot 2D map of elevation generated by an OCN

View source: R/draw_elev2D_OCN.R

draw_elev2D_OCNR Documentation

Plot 2D map of elevation generated by an OCN

Description

Function that plots the 2D elevation map generated by an OCN.

Usage

draw_elev2D_OCN(OCN, colPalette = terrain.colors(1000, alpha = 1),
addLegend = TRUE, drawRiver = FALSE, thrADraw = 0.002*OCN$FD$nNodes*OCN$cellsize^2,
riverColor = "#00BFFF", min_lwd = 0.5, max_lwd = 5, args_imagePlot = list())

Arguments

OCN

A river object as produced by landscape_OCN.

colPalette

Color palette used for the plot.

addLegend

Logical. If TRUE, image.plot is used to display the legend; as a result, elements (e.g. node coordinates) subsequently plotted of on top of the 2D elevation map might be wrongly positioned.

drawRiver

Logical. If TRUE, draw the OCN on top of the elevation map.

thrADraw

Threshold drainage area value used to display the network.

riverColor

Color used to display the OCN (only effective if drawRiver = TRUE).

min_lwd, max_lwd

Minimum and maximum values of line width used to display the OCN (actual line width is proportional to the square root of drainage area).

args_imagePlot

List of arguments passed to imagePlot (or to image if addLegend = FALSE). For example, argument smallplot can be used to specify the plot coordinates for the legend.

Value

No output is returned.

Examples

# 1) draw 2D map of a 20x20 OCN with default settings
draw_elev2D_OCN(landscape_OCN(OCN_20))

OCNet documentation built on Nov. 24, 2023, 1:06 a.m.