plot_establishment_captured: Plots the cumulative proportion of establishment likelihood...

View source: R/plot_establishment_captured.R

plot_establishment_capturedR Documentation

Plots the cumulative proportion of establishment likelihood captured

Description

Plots the cumulative proportion of establishment likelihood captured as a greater number of top ranking risk cells is considered.

Usage

plot_establishment_captured(
  data,
  xlab = "Number of cells",
  ylab = "Proportion",
  legend_title = NULL,
  legend = "right",
  prop_line,
  y_limit = NULL,
  width = NA,
  height = NA,
  units = c("in", "cm", "mm"),
  outfile
)

Arguments

data

A data.frame as derived from captured_by_ncells().

xlab

Character. x axis label.

ylab

Character. y axis label.

legend_title

Character. Optional legend title.

legend

Legend position. Either a position name (one of "none", "top", "bottom", "left", or "right", or a vector of two normalised coordinates ranging from 0 to 1, e.g. c(1, 0) (for bottom-right).

prop_line

Numeric. Proportion in which to add a vertical line. Default is NULL (no line).

y_limit

Numeric vector giving the minimum and maximum y-axis limits. If omitted this will be determined based on the data.

width

Width of plot. If not defined will use size of current graphic device.

height

Height of plot. If not defined will use size of current graphic device.

units

Character. Units corresponding to height and width. Can be "in", "cm", or "mm". Default is inches ("in").

outfile

Character. Output image file path. Containing directory will be created recursively if it does not already exist.

Value

An image is written to outfile if provided, and otherwise a ggplot object is returned.


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