Learn R Programming

ToolsForCoDa (version 1.1.0)

ternaryplot: Create a Ternary Plot for three-part Compositions

Description

Function ternaryplot accepts a matrix of three part compositions or non-negative counts and presents these in a ternary diagram.

Usage

ternaryplot(X, vertexlab = colnames(X), vertex.cex = 1, pch = 19, addpoints = TRUE,
            grid = FALSE, gridlabels = TRUE, ...)

Value

NULL

Arguments

X

A matrix of counts or compositions with three columns

vertexlab

Labels for the vertices of the tenary diagram

vertex.cex

Character expansion factor for vertex labels

pch

Plotting character for the compositions

addpoints

Show the compositions addpoints=TRUE or not

grid

Place a grid over the ternary diagram

gridlabels

Place grid labels or not

...

Additional arguments for the points function

Author

Jan Graffelman (jan.graffelman@upc.edu)

Examples

Run this code
data("Artificial")
Xsim.com <- Artificial$Xsim.com
colnames(Xsim.com) <- paste("X",1:3,sep="")
ternaryplot(Xsim.com)

Run the code above in your browser using DataLab