text.ternary | R Documentation |
Add text an existing ternary diagram
## S3 method for class 'ternary'
text(x, labels = 1:nrow(x$x), ...)
x |
an object of class |
labels |
a character vector or expression specifying the text to be written |
... |
optional arguments to the generic |
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')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.