Plot.Covariates | R Documentation |
Use the ggplot2 plotting engine to easily create visualisations of covariate raster data - like the ones obtained using CovariateSetup(...) - and overlay sf polygon data if desired.
Plot.Covariates(
Covariates,
SF,
COL = viridis::cividis(100),
Size = 1,
Shape = 1
)
Covariates |
List of length 2. Containing training resolution covariate SpatRast in slot 1 and target resolution covariate SpatRast in slot 2. |
SF |
Optional. SF object which to overlay. |
COL |
Colour palette. |
Size |
Optional. Size of SF overlay. |
Shape |
Optional. Shape of SF overlay if points. |
A ggplot2 object visualising a raster.
CovariateSetup
.
Cov_train <- terra::rast(system.file("extdata", "Covariates_Train.nc", package = "KrigR"))
Cov_target <- terra::rast(system.file("extdata", "Covariates_Target.nc", package = "KrigR"))
names(Cov_train) <- names(Cov_target) <- "GMTED2010 [m]"
Covariates <- list(Training = Cov_train, Target = Cov_target)
data("Jotunheimen_poly")
SF <- Jotunheimen_poly
Plot.Covariates(Covariates = Covariates, SF = SF)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.