AlphaPlot: A Bivariate Plot of Live-Dead Offsets in Alpha Diversity and...

View source: R/AlphaPlot.R

AlphaPlotR Documentation

A Bivariate Plot of Live-Dead Offsets in Alpha Diversity and Evenness

Description

AlphaPlot function generates a bivariate plot of offsets in alpha diversity (DELTA S; x-axis) and evenness (DELTA PIE; y-axis) for within-site pairwise comparisons of live and dead samples.

Usage

AlphaPlot(
  x,
  pch = 21,
  pch.gp = 16,
  col = "black",
  bgpt = "white",
  transp = 1,
  cex = 0.8,
  cf.bars = TRUE,
  cf.col = "black",
  cf.lwd = 1,
  colmean = "black",
  col.gp = NULL,
  mean.lwd = 2,
  transp_mean = 1,
  xlab = bquote(Delta[" S"]),
  ylab = bquote(Delta[" PIE"]),
  axes = TRUE,
  xmax = NULL,
  ymax = NULL,
  legend.cex = 1,
  addlegend = TRUE,
  ...
)

Arguments

x

An object of the class 'FidelityDiv' returned by FidelityDiv function

pch

An integer defining symbol type (default=21). Filled symbols (21-25) should be used.

pch.gp

An integer defining symbol type for means (default=16).

col

A character string or number defining color of symbols for individual sites (default = 'black'). This argument applies only if a grouping factor 'gp' is not provided.

bgpt

A character string or number defining background color of symbols for individual sites (default = 'white').

transp

Numerical (default=1): defines transparency of symbols and associated confidence intervals. Allowed values range from 0 (transparent) to 1 (opaque). Note: transp=0 will suppress plotting of symbols and bars.

cex

A numerical value (default=0.8) defining expansion factor for symbols.

cf.bars

Logical (default=TRUE) to indicate if confidence bars should be plotted.

cf.col

A character string or a number defining color of confidence bars for individual sites (default = 'black'). This argument applies only if a grouping factor 'gp' is not provided.

cf.lwd

A numerical value defining line width for confidence bars (default = 1).

colmean

A character string or number defining color of bars representing mean estimates for all sites (default = 'black')

col.gp

A character string or number defining colors for group (default = 1:#levels) for symbols and bars for sites (applicable when 'gp' factor is provided). The number of colors must match number of levels in a grouping factor

mean.lwd

A numerical value defining line width for confidence bars for group means (default = 2).

transp_mean

Numerical (default=1): defines transparency of means and associated confidence intervals. Allowed values range from 0 (transparent = invisible) to 1 (opaque). Note: transp=1 will suppress plotting of symbols and bars for group means.

xlab

A character string defining x axis label (default=bquote(Delta['S']).

ylab

A character string defining y axis label (default=bquote(Delta['PIE']).

axes

Logical (default = TRUE): plots or suppresses axes

xmax

A positive numerical value defining x axis range (-xmax, xmax)

ymax

A positive numerical value defining y axis range (-ymax, ymax)

legend.cex

A numerical value (default = 1) defining text size for legend.

addlegend

Logical (default=TRUE): adds legend to the plot, if 'gp' factor is provided

...

Other graphic arguments applicable to function plot.default

Details

AlphaPlot function uses the object of the class FidelityDiv by FidelityDiv function to produce a cross-plot visualizing live-dead differences in alpha diversity (DELTA S) and evenness (DELTA PIE), including confidence bars for each site. If a grouping factor is provided, symbols and bars are color-coded by levels and group means are plotted in addition to grand mean for all sites. Other graphic arguments applicable to function plot.default can be specified.

Value

A bivariate plot.

Examples


my.fid1 <- FidelityDiv(FidData$live, FidData$dead, iter=100, n.filters=50)
AlphaPlot(my.fid1)
my.fid2 <- FidelityDiv(FidData$live[6:9,], FidData$dead[6:9,], FidData$habitat[6:9],
                       n.filters=20, iter=100, CI=0.95)
AlphaPlot(my.fid2, col.gp=c('forestgreen', 'coral1'), bgpt='beige', mean.lwd=5, transp_mean=0.5)


MJKowalewski/PaleoFidelity documentation built on Aug. 25, 2024, 8:27 p.m.