View source: R/draw_subcatchments_OCN.R
| draw_subcatchments_OCN | R Documentation |
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.
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(), ...)
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 |
No output is returned.
draw_thematic_OCN
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.