draw_subcatchments_OCN {OCNet} | R Documentation |
Draw subcatchment map from an Optimal Channel Network
Description
Function that draws a map of subcatchments generated by the aggregation process on the OCN. If theme
is NULL
, colormap is such that neighbouring subcatchments have distinguished colors. If theme
is specified, colors reflect the values of theme
across subcatchments, in analogy with draw_thematic_OCN
.
Usage
draw_subcatchments_OCN(OCN, theme = NULL, drawRiver = TRUE,
colPalette = NULL, colLevels = NULL, riverColor = NULL, addLegend = NULL,
min_lwd = 0.5, max_lwd = 5, add = FALSE, args_imagePlot = list(), ...)
Arguments
OCN |
A |
theme |
Vector (of length |
drawRiver |
Logical. If |
colPalette |
Color palette used. |
colLevels |
Number of colors in the palette (only effective if |
riverColor |
Color used to display the OCN (only effective if |
addLegend |
Logical. State if a legend should be displayed (only active if |
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). |
add |
Logical. If |
args_imagePlot |
Only effective if |
... |
Further arguments to be passed to |
Value
No output is returned.
See Also
Examples
# 1a) aggregate a 20x20 OCN , use thrA = 5 pixels
# and draw subcatchments with default color palette
OCN <- aggregate_OCN(landscape_OCN(OCN_20), thrA = 5)
draw_subcatchments_OCN(OCN, drawRiver = TRUE)
# 1b) same as above, but define color palette with a function
draw_subcatchments_OCN(OCN, drawRiver = TRUE, colPalette = rainbow)
# 1c) same as above, but define color palette with a vector of colors
draw_subcatchments_OCN(OCN, drawRiver = TRUE, colPalette = hcl.colors(6, "Dark 3"))
# 2) Display theme at subcatchment level
draw_subcatchments_OCN(OCN, theme = OCN$AG$A)