Skip to contents

Map of M with the records used, the expert additions highlighted and the corridors, on a light land background (Natural Earth countries when the rnaturalearth package is installed, or your own land polygons). For m_scenarios() each scenario is shown in its own panel.

Usage

plot_m_area(
  x,
  land = NULL,
  points = TRUE,
  base_size = 11,
  file = NULL,
  width = 2400,
  height = 2100
)

Arguments

x

An m_area or m_scenarios object.

land

Optional land polygons for the background.

points

Show the records (thinned).

base_size

Base font size.

file

Optional file(s) to save the plot to, e.g. "fig.pdf" or c("fig.png", "fig.pdf"); the format follows the extension, and a name without extension is saved as PNG and PDF. The plot is also returned.

width, height

Size of the saved figure in pixels (PDF and SVG at 300 pixels per inch).

Value

A ggplot object.

Examples

sim <- simulate_enm_data(seed = 1, n_presence = 150)
m <- delimit_m(sim$presence, link_km = 120, thin_km = 5)
plot_m_area(m)