multiplot: Plot PDF curves of given type and variable for density list...

Description Usage Arguments Examples

View source: R/plotting.R

Description

Using an object from the cRacle::dens_obj() function. Plot a series PDF curves in a new plot window.

Usage

1
2
3
4
5
6
7
8
9
multiplot(
  dens.oblist,
  var,
  col = sample(wes_palette("Zissou1", n = 99, type = "continuous"), 9999, replace = T),
  type = ".kde",
  l.pos = "topleft",
  l.cex = 0.8,
  w = FALSE
)

Arguments

dens.oblist

An object derived from the cRacle::dens_obj() function.

var

A character string that matches one of the layer names in the source raster object.

col

A color vector of the same length as the dens.oblist object. Default is 'wes_palette("FantasticFox1")'.

type

A character string of value either ".kde" for a Kernel Density Estimator curve, or ".gauss" for a Gaussian (normal) curve. All other values will result in errors.

l.pos

Legend position. Recommend 'topleft' or 'topright'. Default is 'topleft'.

l.cex

cex setting for legend. Default is 0.8.

w

TRUE or FALSE to show weighted probability functions

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
#distr <- read.table('test_mat.txt', head=T, sep ="\t");
#OR:
data(distr); data(climondbioclim);
extr.raw = extraction(data=distr, clim= climondbioclim, schema='raw');
dens.list.raw <- dens_obj(extr.raw, clim = climondbioclim, bw = 'nrd0', n = 1024);
multiplot(dens.list.raw, names(climondbioclim[[1]]));

## End(Not run)

rsh249/CRACLE documentation built on Feb. 2, 2022, 11:31 p.m.