View source: R/plotBehaviour.R
plotBehaviour | R Documentation |
The plotBehaviour()
function allows plotting spatial statistics generated using
the spatialBehaviour()
function and stored in SpatRaster
objects.
plotBehaviour(
sts,
rasterProduct,
colorPalette = NULL,
main = NULL,
xlim = NULL,
ylim = NULL,
labels = FALSE,
by = 8,
pos = 3,
legends = "topright",
dynamicPlot = FALSE
)
sts |
|
rasterProduct |
layer name in a
|
colorPalette |
character vector. The color palette used to plot the raster layer.
If |
main |
character. Title of the plot. If |
xlim |
numeric vector. The x limits of the plot. |
ylim |
numeric vector. The y limits of the plot. |
labels |
logical. Whether (TRUE) or not (FALSE, default setting) to add labels with the name of the storm and the indices and ISO times of the observation. |
by |
numeric. If |
pos |
numeric. If |
legends |
character. Indicates where to plot the legend, |
dynamicPlot |
logical. Whether (FALSE, default setting) or (TRUE) to plot the data dynamicaly using leaflet library |
A plot of the storm track data with the raster layer.
# Creating a stormsDataset
sds <- defStormsDataset()
# Getting storm track data for tropical cyclone Pam (2015)
pam <- defStormsList(sds = sds, loi = "Vanuatu", names = "PAM")
# Plotting maximum sustained wind speed for Pam (2015) near Vanuatu
pam.msw <- spatialBehaviour(pam, verbose = 0)
plotBehaviour(pam, pam.msw)
# dynamicPlot mode
plotBehaviour(pam, pam.msw, dynamicPlot = TRUE)
# Plotting 2D wind speed profile for Pam (2015) near Vanuatu
pam.prof <- spatialBehaviour(pam, product = "Profiles", verbose = 0)
plotBehaviour(pam, pam.prof$PAM_Speed_37, labels = TRUE, pos = 4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.