Learn R Programming

SDMtune (version 0.1.0)

plotPred: Plot Prediction

Description

Plot Prediction output.

Usage

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

Arguments

map

raster object with the prediction.

lt

character. Legend title, default is an empty string.

colorramp

vector. A custom color ramp given as a vector of colors (see example), default is NULL and uses a color ramp similar to the original MaxEnt output.

hr

logical, if TRUE produces an output with high resolution, default is FALSE.

Value

A ggplot object.

See Also

plotPA

Examples

Run this code
# NOT RUN {
map <- raster::raster(matrix(runif(400, 0, 1), 20, 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