draw_contour_OCN {OCNet} | R Documentation |
Draw Optimal Channel Network with catchment contours
Description
Function that plots real-shaped OCN and catchment contours.
Usage
draw_contour_OCN(OCN, thrADraw = 0.002 * OCN$FD$nNodes *
OCN$cellsize^2, exactDraw = TRUE, drawContours = TRUE, colPalRiver = NULL,
colPalCont = "#000000", drawOutlets = 0, pch = 15, colPalOut = "#000000",
min_lwd = 0.5, max_lwd = 5, contour_lwd = 2, add = FALSE)
Arguments
OCN |
A |
thrADraw |
Threshold drainage area value used to display the network. |
exactDraw |
If |
drawContours |
If |
colPalRiver |
Color palette used to plot the river network(s). Default is a rearranged version of theme |
colPalCont |
Color palette used to plot the catchment contour(s). Details as in |
drawOutlets |
If equal to |
pch |
Shape of the outlet points (if |
colPalOut |
Color palette used to plot the outlet points (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). |
contour_lwd |
Line width value for catchment contour plotting. |
add |
Logical. If |
Details
For not too large networks (i.e. if OCN$FD$nNodes <= 40000
, corresponding to a 200x200 lattice),
pixels whose drainage area OCN$FD$A
is lower than thrADraw
are drawn with a light grey stroke.
If OCN$FD$nNodes > 40000
, in order to speed up the execution of this function, only the network constituted
by pixels such that OCN$FD$A > thrADraw
is drawn.
Value
No output is returned.
Examples
# 1) draw contour of a 20x20 single-outlet OCN
# (for single-outlet OCNs without periodic boundaries, the output
# of draw_contour_OCN is very similar to that of draw_simple_OCN)
draw_contour_OCN(landscape_OCN(OCN_20), thrADraw = 4)
## Not run:
# 2a) plot real shape of multiple-outlet OCN created with periodic boundaries
# add outlets on top of the rivers
OCN <- landscape_OCN(OCN_300_4out_PB_hot, displayUpdates = 2) # it takes around one minute
draw_contour_OCN(OCN, drawOutlets = 2)
# 2b) same as before, but use same color palette for rivers and contours
draw_contour_OCN(OCN, colPalCont = 0)
# 2c) draw contours of catchments obtained from an OCN with nOutlet = "All"
OCN <- landscape_OCN(OCN_400_Allout, displayUpdates = 2) # it takes some minutes
draw_contour_OCN(OCN)
# 2d) same as above, but do not plot contours, and plot outlets
# with same color palette as rivers
draw_contour_OCN(OCN, drawContours = FALSE, drawOutlets = TRUE,
colPalOut = 0)
## End(Not run)