View source: R/draw_elev3D_OCN.R
draw_elev3D_OCN | R Documentation |
Function that plots the 3D elevation map generated by an OCN.
draw_elev3D_OCN(OCN, coarseGrain = c(1,1), colPalette = terrain.colors(1000, alpha = 1),
addColorbar = TRUE, drawRiver = TRUE, thrADraw = 0.002 *
OCN$FD$nNodes * OCN$cellsize^2, riverColor = "#00CCFF",
theta = -20, phi = 30, expand = 0.05, shade = 0.5, min_lwd = 0.5, max_lwd = 5,
args_imagePlot = list())
OCN |
A |
coarseGrain |
2x1 vector (only effective if |
colPalette |
Color palette used for the plot. |
addColorbar |
If |
drawRiver |
If |
thrADraw |
Threshold drainage area value used to display the network. |
riverColor |
Color used to plot the river. |
theta , phi , expand , shade |
Additional parameters passed to the perspective plotting
function |
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 |
Only effective if |
No output is returned.
# draw 3D representation of a 20x20 OCN with default options
draw_elev3D_OCN(landscape_OCN(OCN_20))
## Not run:
# 1a) draw the 3D representation of the OCN (without displaying the river
# and the colorbar) and enhance the aspect ratio of Z coordinates
# with respect to the default value (the final result will be ugly):
OCN <- landscape_OCN(OCN_400_Allout, displayUpdates = 2) # this takes some minutes
draw_elev3D_OCN(OCN, expand = 0.2, addColorbar = FALSE, drawRiver = FALSE)
# 1b) same as above, but operate coarse graining and modify shade for better aesthetics:
draw_elev3D_OCN(OCN, coarseGrain = c(5,5), expand = 0.2,
shade = 0.25, addColorbar = FALSE, drawRiver = FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.