Learn R Programming

tabula (version 1.5.1)

plot_spot: Spot Plot

Description

Plots a spot matrix.

Usage

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.

See Also

Other plot: plot_bar, plot_date(), plot_diversity(), plot_line, plot_matrix

Examples

Run this code
# NOT RUN {
## 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)
# }

Run the code above in your browser using DataLab