text.ternary: Ternary text plotting

Description Usage Arguments Examples

View source: R/ternary.R

Description

Add text an existing ternary diagram

Usage

1
2
## S3 method for class 'ternary'
text(x, labels = 1:nrow(x$x), ...)

Arguments

x

an object of class ternary, or a three-column data frame or matrix

labels

a character vector or expression specifying the text to be written

...

optional arguments to the generic text function

Examples

1
2
3
4
5
6
data(Namib)
tern <- ternary(Namib$Major,'CaO','Na2O','K2O')
plot(tern,pch=21,bg='red',labels=NULL)
# add the geometric mean composition as a text label:
gmean <- ternary(exp(colMeans(log(tern$x))))
text(gmean,labels='geometric mean')

provenance documentation built on May 5, 2021, 1:06 a.m.