plot_cons_plans: Plot conservation plans in mean-variance space

View source: R/plot_cons_plans.R

plot_cons_plansR Documentation

Plot conservation plans in mean-variance space

Description

This makes a mean-variance plot of the portfolio output. It can take care of: plotting the individual portfolios, adding 2D kernel density polygons at two quantile levels, and adding an efficient frontier.

Usage

plot_cons_plans(
  plans_mv,
  plans_name,
  cols,
  xlim = NULL,
  ylim = NULL,
  add_pts = TRUE,
  add_all_efs = FALSE,
  x_axis = TRUE,
  y_axis = TRUE,
  add_legend = TRUE,
  legend_pos = "topright",
  w_show = "all",
  xlab = "Variance",
  ylab = "Mean",
  add_poly = TRUE,
  ...
)

Arguments

plans_mv

The plans_mv element of the output from run_cons_plans.

plans_name

A character vector of what to label each conservation plan.

cols

Colours for the conservation plan polygons.

xlim

X limits

ylim

Y limits

add_pts

Logical: add the points?

add_all_efs

Logical: add efficient frontiers?

x_axis

Logical: add x axis?

y_axis

Logical: add y axis?

add_legend

Logical: add y legend?

legend_pos

A character string to pass to legend denoting the position of the legend.

w_show

If "all" then all plans will be shown. If a numeric vector, then those plans will be shown. E.g. c(1, 3) will only show the first and third plans.

xlab

X axis label.

ylab

Y axis label.

add_poly

Add the kernal smoother quantile polygons?

...

Anything else to pass to plot.default.

Value

A plot. Also, the x and y limits are returned invisibly as a list. This makes it easy to make the first plot and then save those x and y limits to fix them in subsequent (multipanel) plots.


metafolio documentation built on Oct. 21, 2023, 1:06 a.m.