Learn R Programming

speciesgeocodeR (version 1.0-4)

PlotHull: Plotting Species Ranges

Description

Plots species distribution ranges derived with CalcRange in the geographic context.

Usage

PlotHull(dat, xlim = c(-180, 180), ylim = c(-90, 90), col = rgb(255, 0, 0, 50, maxColorValue = 255), border = rgb(255, 0, 0, 50, maxColorValue = 255), type = "overlay", select = "all", ...)

Arguments

dat
a list of ‘SpatialPolygons’ objects created with CalcRange.
xlim
vector indicating the x-axis plotting limits. Default is c(-180, 180).
ylim
a vector indicating the y-axis plotting limits. Default = c(-90, 90).
col
character string indicating the colour of the polygons. Default is to transparent red.
border
a character string indicating the color of the polygon borders. Default is to transparent red.
type
a character string indicating if all range polygons in the input file shall be overlaid or plotted on separate plots. Must be “seperate” or “all”. Default is to “all” (overlay).
select
a character string indicating which elements of the list to plot. Can be one or multiple species names. Default = “all”.
...
additional arguments passed to plot.

Value

A plot or a set of plots.

Details

If type is set to “separate”, set par(ask = T) to see all maps.

Examples

Run this code
data("lemurs_in")
dat <- CalcRange(data.frame(lemurs_in$identifier,
                            lemurs_in$species_coordinates),
                 value = "shape")
PlotHull(dat, xlim = c(-130, -100), ylim = c(30,60))

Run the code above in your browser using DataLab