Plots a spot matrix.

plot_spot(object, ...)

# S4 method for CountMatrix
plot_spot(object, threshold = NULL)

# S4 method for AbundanceMatrix
plot_spot(object, threshold = NULL)

# S4 method for SimilarityMatrix
plot_spot(object)

# S4 method for OccurrenceMatrix
plot_spot(object)

Arguments

object

An object to be plotted.

...

Currently not used.

threshold

A function that takes a numeric vector as argument and returns a numeric threshold value. If NULL (the default), no threshold is computed.

Value

A ggplot object.

Details

The spot matrix can be considered as a variant of the Bertin diagram where the data are first transformed to relative frequencies.

Note

Adapted from Dan Gopstein's original idea. Credit should be given to him.

See also

Author

N. Frerebeau

Examples

## Plot spot diagram... ## ...of count data... mississippi_count <- as_count(mississippi) ### ...without threshod plot_spot(mississippi_count)
### ...with the column means as threshold plot_spot(mississippi_count, threshold = mean)
### ...with the column medians as threshold plot_spot(mississippi_count, threshold = median)
## ...of a similarity matrix sim <- similarity(mississippi_count, method = "brainerd") plot_spot(sim)
## ...of a co-occurrence matrix occ <- as_occurrence(mississippi) plot_spot(occ)