plotSp: Create plot of Distribution or Range

View source: R/plotSp.R

plotSpR Documentation

Create plot of Distribution or Range

Description

Read a SpatialPointsDataFrame or normal dataframe and plot the coordinates

Usage

plotSp(
  data,
  name = "",
  extent = NA,
  world = TRUE,
  cut = FALSE,
  grid = FALSE,
  save = FALSE,
  geom = "tile",
  filename,
  dpi = 300,
  width = NA,
  height = NA,
  units = c("in", "cm", "mm")
)

Arguments

data

RasterLayer, SpatialPointsDataFrame or data.frame

name

character. Adds a name to the legend if provided.

extent

Specify extent of your Map

world

Should world map outline be plotted or not

cut

logical. Cut outline by extent

grid

logical. Should grid lines and axes be drawn or not

save

logical. If TRUE plot object is saved, see also the subsequent parameters.

geom

One of raster, tile or point. Default is tile.

filename

character. File name to create on disk.

dpi

numeric. Plot resolution.

width, height, units

Plot size in units ("in", "cm", or "mm"). If not supplied, uses the size of current graphics device.

Value

ggplot2 object

Examples

## Not run: 
library(climateNiche)
data(Passer_domesticus)

plotSp(data=Passer_domesticus)

## End(Not run)

RS-eco/climateNiche documentation built on Feb. 21, 2023, 5:25 a.m.