bathyMap | R Documentation |
Generate a bathymetry map from a provided DEM raster with optional contours and depth labels.
bathyMap(
DEM,
contours = TRUE,
start = NULL,
end = NULL,
by = 5,
breaks = NULL,
units = "ft",
labels = TRUE,
textSize = 1.5,
plotTitle = NULL
)
DEM |
SpatRaster object of a given waterbody, rasters can be transformed to SpatRaster via the rast() function in 'terra' |
contours |
logical indicating whether contours should included (TRUE) or not (FALSE), default = TRUE |
start |
numeric value describing what value contours should start at, default = 0 |
end |
numeric value describing what value contours should end at, default = max depth |
by |
numeric value describing contour intervals, default = 5 |
breaks |
optional numeric vector describing specific contours to include if contours = T, default = NULL |
units |
character describing units of depth measurement, default = "ft" |
labels |
logical indicating whether labels should be included (TRUE) or not (FALSE), default = TRUE |
textSize |
number describing text size of contour labels if included, default = 1.5 |
plotTitle |
optional character string adding title to output plot |
ggplot object
Tristan Blechinger, Department of Zoology & Physiology, University of Wyoming
#load raster
DEM <- terra::rast(system.file("extdata", "example_raster.tif", package = 'rLakeHabitat'))
#run function
bathyMap(DEM, contours = TRUE, units = 'm', labels = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.