Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plot_star

Plot a matrix or an *_ipm object


Description

Plot a matrix or an *_ipm object

Usage

## S3 method for class 'ipmr_matrix'
plot(
  x = NULL,
  y = NULL,
  A,
  col = grDevices::rainbow(100, start = 0.67, end = 0),
  bw = FALSE,
  do_contour = FALSE,
  do_legend = FALSE,
  ...
)

## S3 method for class 'simple_di_det_ipm'
plot(
  x = NULL,
  y = NULL,
  ipm = NULL,
  col = rainbow(100, start = 0.67, end = 0),
  bw = FALSE,
  do_contour = FALSE,
  do_legend = FALSE,
  exponent = 1,
  ...
)

## S3 method for class 'simple_di_stoch_param_ipm'
plot(
  x = NULL,
  y = NULL,
  ipm = NULL,
  col = rainbow(100, start = 0.67, end = 0),
  bw = FALSE,
  do_contour = FALSE,
  do_legend = FALSE,
  exponent = 1,
  ...
)

## S3 method for class 'simple_di_stoch_kern_ipm'
plot(
  x = NULL,
  y = NULL,
  ipm = NULL,
  col = rainbow(100, start = 0.67, end = 0),
  bw = FALSE,
  do_contour = FALSE,
  do_legend = FALSE,
  exponent = 1,
  ...
)

## S3 method for class 'general_di_det_ipm'
plot(
  x = NULL,
  y = NULL,
  ipm = NULL,
  mega_mat = NA_character_,
  col = rainbow(100, start = 0.67, end = 0),
  bw = FALSE,
  do_contour = FALSE,
  do_legend = FALSE,
  exponent = 1,
  ...
)

Arguments

x, y

Either the values of the meshpoints or NULL. If NULL, then a sequence is generated so that meshpoints are given sequential bin numbers.

A, ipm

A matrix or a result from make_ipm, or NULL if x is specified as the matrix or IPM object.

col

A vector of colors to use for plotting

bw

A logical indicating whether to use a greyscale palette for plotting

do_contour

A logical indicating whether or not draw contour lines on the plot

do_legend

A logical indicating whether to draw a legend for the plot

...

further arguments passed to legend

exponent

The exponent to raise each kernel to. Setting this to a low number can help visualize kernels that are overwhelmed by a few very large numbers.

mega_mat

A vector with symbols, I's, and/or 0s representing the matrix blocks. They should be specified in ROW MAJOR order! Can also be a character string specifying the call. Hierarchical syntax is supported. When used, format_mega_matrix will produce as many mega-matrices as there are combinations of levels_hier_effs in the proto_ipm.

Details

plot.ipmr_matrix is intended for internal use only, and it is usually safer to use plot.*_ipm methods for visualizing kernels. If an IPM kernel is overwhelmed by information in say, a fecundity sub-kernel, use the exponent argument in plot.*_ipm to make it more visually appealing.

Value

A or ipm invisibly


ipmr

Fits Integral Projection Models Using an Expression Based Framework

v0.0.1
MIT + file LICENSE
Authors
Sam Levin [aut, cre] (<https://orcid.org/0000-0002-3289-9925>), Aldo Compagnoni [aut], Dylan Childs [aut], Sanne Evers [aut], Roberto Salguero-Gomez [aut], Tiffany Knight [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.