plot_taxa_ridges: Taxon change point ridge plots

View source: R/plot_taxa_ridges.R

plot_taxa_ridgesR Documentation

Taxon change point ridge plots

Description

Taxon change point ridge plots

Usage

plot_taxa_ridges(
  titan.out,
  z1 = TRUE,
  z2 = TRUE,
  z1_fill_low = "lightblue",
  z1_fill_high = "black",
  z2_fill_low = "pink",
  z2_fill_high = "red",
  xlabel = "Environmental Gradient",
  n_ytaxa = 90,
  printspp = FALSE,
  grid = TRUE,
  d_lines = FALSE,
  trans = "identity",
  xaxis = !grid,
  xlim,
  breaks = ggplot2::waiver(),
  bw,
  rel_heights,
  ...,
  axis.text.x,
  axis.text.y,
  axis.title.x,
  axis.title.y
)

Arguments

titan.out

A TITAN output object.

z1

A logical specifying whether decreasing taxa should be plotted.

z2

A logical specifying whether increasing taxa should be plotted.

z1_fill_low, z1_fill_high, z2_fill_low, z2_fill_high

Respective fill colors passed to scale_fill_gradient()

xlabel

A character string for the x axis label.

n_ytaxa

The maximum number of taxa to be plotted.

printspp

A logical specifying whether the sppmax table should be printed.

grid

The grid argument of theme_ridges(). Setting this to FALSE removes horizontal lines from the plot, see examples.

d_lines

Argument to pass to geom_density_ridges(). Short for density lines, a logical determining whether the median change point values from estimated from each taxon's density function, is plotted. If TRUE, a dashed, black vertical line will be plotted.

trans

a scale transformation to be applied to the x-axis through ggplot2. e.g. "log10" or "sqrt".

xaxis

Logical; should the x-axis be plotted?

xlim

x axis limits, e.g. xlim = c(0,10).

breaks

Argument to pass to geom_density_ridges(). Determines values and labels of breaks (ticks) on the x-axis.

bw

The bandwidth of used in the kernel density estimate; see density().

rel_heights

Argument to pass to cowplot::plot_grid() as an override for the defaults

...

Arguments to pass to geom_density_ridges()

axis.text.x, axis.text.y, axis.title.x, axis.title.y

Font sizes of respective axis text. Passed as the size argument to the ggplot2 thematic elements of the same name. Defaults to current default ggplot2 theme.

Value

A plot of decreasing and/or increasing taxon-specific change points along the environmental gradient.

Note

Should not be used with output objects from TITAN v1.0.

Author(s)

M. Baker, R. King, D. Kahle

References

Baker, ME and RS King. 2010. A new method for detecting and interpreting biodiversity and ecological community thresholds. Methods in Ecology and Evolution 1(1): 25:37.

King, RS and ME Baker 2010. Considerations for identifying and interpreting ecological community thresholds. Journal of the North American Benthological Association 29(3):998-1008.

See Also

plot_sumz(), plot_cps()

Examples


data(glades.titan)


# basic usage
plot_taxa_ridges(glades.titan)


## Not run:  reduce R CMD check time

# manipulating the x axis thematic components
plot_taxa_ridges(glades.titan, grid = FALSE)
plot_taxa_ridges(glades.titan, xaxis = TRUE)


# applying scale transformations
plot_taxa_ridges(glades.titan, trans = "log10", xlim = c(1,150))


# removing z2
plot_taxa_ridges(glades.titan, z2 = FALSE, trans = "sqrt", xlim = c(0, 150))


# more styling
plot_taxa_ridges(glades.titan,
  axis.text.x = 12,
  axis.text.y = 4,
  axis.title.x = 14,
  xlabel = expression(paste("Surface water total phosphorus ("*mu*"g/l)"))
)


## End(Not run)




TITAN2 documentation built on Nov. 15, 2023, 1:09 a.m.