Learn R Programming

provenance (version 0.1)

ternaryplot: Plot a ternary diagram

Description

Plots triplets of compositional data on a ternary diagram

Usage

ternaryplot(x, y, z, type = "empty", pch = NA, labels = names(x), ...)

Arguments

x
vector with the first variable
y
vector with the second variable
z
vector with the third variable
type
adds annotations to the ternary diagram, one of either empty, QFL, QFL.dickinson or QmFLt.dickinson
pch
plot symbol
labels
vector of strings to be added to the plot symbols
...
optional arguments to the generic points function

Examples

Run this code
PT <- read.HMdata(system.file("PT.csv",package="provenance"))
q <- PT$x[,'Q']
f <- PT$x[,'KF'] + PT$x[,'P']
l <- PT$x[,'Lm'] + PT$x[,'Lv'] + PT$x[,'Ls']
ternaryplot(q,f,l,type='QFL.dickinson',labels=names(PT))

Run the code above in your browser using DataLab