Plots a spot matrix.
plot_spot(object, ...) # S4 method for matrix plot_spot(object, threshold = NULL, diag = TRUE, upper = TRUE, ...) # S4 method for dist plot_spot(object, diag = FALSE, upper = FALSE, ...) # S4 method for OccurrenceMatrix plot_spot(object, diag = FALSE, upper = FALSE, ...)
An abundance matrix to be plotted.
Extra parameters to be passed to
functionthat takes a numeric vector as argument and returns a numeric threshold value. If
NULL(the default), no threshold is computed.
logicalscalar indicating whether the diagonal of the matrix should be plotted.
logicalscalar indicating whether the upper triangle of the matrix should be plotted.
A ggplot2::ggplot object.
The spot matrix can be considered as a variant of the Bertin diagram where the data are first transformed to relative frequencies.
Adapted from Dan Gopstein's original idea.
## Plot spot diagram of count data... data("mississippi", package = "folio") counts <- as_count(mississippi) ### ...without threshod plot_spot(counts) ### ...with the column means as threshold plot_spot(counts, threshold = mean) ### ...with the column medians as threshold plot_spot(counts, threshold = median)