plotLayers {voluModel} | R Documentation |
Plotting 3D model in 2D
Description
This script plots a semitransparent layer of suitable habitat for each depth layer. The redder the color, the shallower the layer, the bluer, the deeper. The more saturated the color, the more layers with suitable habitat.
Usage
plotLayers(
rast,
land = NA,
landCol = "black",
title = NULL,
graticule = TRUE,
...
)
Arguments
rast |
A |
land |
An optional coastline polygon shapefile
of types |
landCol |
Color for land on map. |
title |
A title for the plot. If not title is
supplied, the title "Suitability from (MINIMUM
DEPTH) to (MAXIMUM DEPTH)" is inferred from
names of |
graticule |
Do you want a grid of lon/lat lines? |
... |
Additional optional arguments. |
Value
A plot of class recordedplot
Note
Only include the depth layers that you actually want to plot.
See Also
Examples
library(terra)
rast1 <- rast(ncol=10, nrow=10)
values(rast1) <- rep(0:1, 50)
rast2 <- rast(ncol=10, nrow=10)
values(rast2) <- c(rep(0, 50), rep(1,50))
rast3 <- rast(ncol=10, nrow=10)
values(rast3) <- rep(c(1,0,0,1), 25)
distBrick <- c(rast1, rast2, rast3)
plotLayers(distBrick)