text.ternary: Ternary text plotting

View source: R/ternary.R

text.ternaryR Documentation

Ternary text plotting

Description

Add text an existing ternary diagram

Usage

## 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

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 Aug. 28, 2023, 5:07 p.m.