plot_raster: Plot a raster

View source: R/plot_raster.R

plot_rasterR Documentation

Plot a raster

Description

Plot a raster.

Usage

plot_raster(
  object,
  legend_title,
  occurrence_data = NULL,
  pt_col = "red",
  height,
  compass = FALSE,
  outfile
)

Arguments

object

A RasterLayer or file path to raster file.

legend_title

Character. If missing, the name of the raster layer will be used.

occurrence_data

A data.frame, sf object, SpatialPointsDataFrame object, or path to a .csv file containing columns named "Latitude" and "Longitude". If NULL, no points will be plotted.

pt_col

Character. Colour of points (if plotted).

height

Height of plot in inches (will be rendered at 300 dpi). Required if outfile is provided.

compass

Logical. Should a North arrow be shown?

outfile

Character. Path to save output.

Value

A tmap object. If outfile is provided, a map will also be written to that file.


jscamac/edmaps documentation built on June 11, 2022, 1:26 a.m.