Learn R Programming

SDMtune (version 1.3.2)

plotPred: Plot Prediction

Description

Plot Prediction output.

Usage

plotPred(map, lt = "", colorramp = NULL, hr = FALSE)

Value

A ggplot object.

Arguments

map

rast object with the prediction.

lt

character. Legend title.

colorramp

vector. A custom colour ramp given as a vector of colours (see example), default is NULL and uses a blue/red colour ramp.

hr

logical. If TRUE produces an output with high resolution.

Author

Sergio Vignali

See Also

plotPA.

Examples

Run this code
map <- terra::rast(matrix(runif(400, 0, 1),
                                    nrow = 20,
                                    ncol= 20))

plotPred(map,
         lt = "Habitat suitability \ncloglog")

# Custom colors
plotPred(map,
         lt = "Habitat suitability",
         colorramp = c("#2c7bb6", "#ffffbf", "#d7191c"))

Run the code above in your browser using DataLab