spp.plot: Plot species

View source: R/generics.R

spp.plotR Documentation

Plot species

Description

This function plots the distribution of species across the study area.

Usage

spp.plot(x, species, ...)

## S3 method for class 'RapData'
spp.plot(
  x,
  species,
  prob.color.palette = "YlGnBu",
  pu.color.palette = c("#4D4D4D", "#00FF00", "#FFFF00", "#FF0000"),
  basemap = "none",
  alpha = ifelse(identical(basemap, "none"), 1, 0.7),
  grayscale = FALSE,
  main = NULL,
  force.reset = FALSE,
  ...
)

## S3 method for class 'RapUnsolved'
spp.plot(
  x,
  species,
  prob.color.palette = "YlGnBu",
  pu.color.palette = c("#4D4D4D", "#00FF00", "#FFFF00", "#FF0000"),
  basemap = "none",
  alpha = ifelse(basemap == "none", 1, 0.7),
  grayscale = FALSE,
  main = NULL,
  force.reset = FALSE,
  ...
)

## S3 method for class 'RapSolved'
spp.plot(
  x,
  species,
  y = 0,
  prob.color.palette = "YlGnBu",
  pu.color.palette = c("#4D4D4D", "#00FF00", "#FFFF00", "#FF0000"),
  basemap = "none",
  alpha = ifelse(basemap == "none", 1, 0.7),
  grayscale = FALSE,
  main = NULL,
  force.reset = FALSE,
  ...
)

Arguments

x

RapData(), RapUnsolved(), or RapSolved() object.

species

character name of species, or integer index for species.

...

not used.

prob.color.palette

character name of color palette to denote probability of occupancy of the species in planning units (see RColorBrewer::brewer.pal()). Defaults to "YlGnBu".

pu.color.palette

character vector of colors to indicate planning unit statuses. Defaults to c("grey30", "green", "black", "red") which indicate not selected, selected, locked in, and locked out (respectively).

basemap

character object indicating the type of basemap to use (see basemap()). Valid options include "none", "roadmap", "mobile", "satellite", "terrain", "hybrid", "mapmaker-roadmap", "mapmaker-hybrid". Defaults to "none" such that no basemap is shown.

alpha

numeric value to indicating the transparency level for coloring the planning units.

grayscale

logical should the basemap be gray-scaled?

main

character title for the plot. Defaults to NULL and a default title is used.

force.reset

logical if basemap data has been cached, should it be re-downloaded?

y

NULL integer 0 to return values for the best solution, integer value greater than 0 for y'th solution value.

Details

This function requires the RgoogleMaps package to be installed in order to create display a basemap.

Examples

## Not run: 
# load RapSolved objects
data(sim_ru, sim_rs)

# plot first species in sim_ru
spp.plot(sim_ru, species = 1)

# plot "bimodal" species in sim_rs
spp.plot(sim_rs, species = "bimodal")

## End(Not run)

paleo13/rapr documentation built on Feb. 12, 2024, 3:27 a.m.