Skip to contents

Add Points to a Ternary Plot

Usage

ternary_points(x, y, z, ...)

# S4 method for numeric,numeric,numeric
ternary_points(x, y, z, type = "p", ...)

# S4 method for ANY,missing,missing
ternary_points(x, type = "p", ...)

Arguments

x, y, z

A numeric vector giving the x, y and z ternary coordinates of a set of points. If y and z are missing, an attempt is made to interpret x in a suitable way (see grDevices::xyz.coords()).

...

Further graphical parameters (see graphics::par()) may also be supplied as arguments, particularly, plotting character, pch, character expansion, cex and color, col.

type

A character string indicating the type of plotting; actually any of the types as in graphics::plot.default().

Value

ternary_points() is called it for its side-effects.

Author

N. Frerebeau

Examples

## Compositional data
coda <- data.frame(
  X = c(20, 60, 20, 20),
  Y = c(20, 20, 60, 40),
  Z = c(60, 20, 20, 40)
)

## Add points
ternary_plot(NULL, panel.first = ternary_grid())
ternary_points(coda, col = "red", pch = 16)