Skip to contents

Displays a matrix of ternary plots.

Usage

# S4 method for class 'CompositionMatrix,missing'
plot(x, ..., margin = NULL, groups = get_groups(x))

Arguments

x

A CompositionMatrix object.

...

Further graphical parameters.

margin

A character string or an integer giving the index of the column to be used as the third part of the ternary plots. If NULL (the default), marginal compositions will be used (i.e. the geometric mean of the non-selected parts).

groups

A vector of grouping elements, as long as the variables in x.

Value

plot() is called for its side-effects: is results in a graphic being displayed (invisibly return x).

Author

N. Frerebeau

Examples

## Data from Day et al. 2011
data("kommos", package = "folio") # Coerce to compositional data
kommos <- remove_NA(kommos, margin = 1) # Remove cases with missing values
coda <- as_composition(kommos, groups = 1) # Use ceramic types for grouping

plot(coda[, 1:6, drop = FALSE])

plot(coda[, 1:6, drop = FALSE], groups = NULL)