Learn R Programming

plotrix (version 2.1-5)

triax.plot: Triangle plot

Description

Display a triangle plot with optional grid.

Usage

triax.plot(x=NULL,main="",at=seq(0.1,0.9,by=0.1),
 axis.labels=NULL,tick.labels=NULL,col.axis="black",cex.axis=1,cex.ticks=1,
 align.labels=TRUE,show.grid=FALSE,col.grid="gray",lty.grid=par("lty"),
 show.legend=FALSE,label.points=FALSE,point.labels=NULL,
 col.symbols="black",pch=par("pch"),...)

Arguments

x
Matrix where each row is three proportions or percentages that must sum to 1 or 100 respectively.
main
The title of the soil texture plot. Defaults to nothing.
at
The tick positions on the three axes.
axis.labels
Labels for the three axes in the order left, right, bottom. Defaults to the column names.
tick.labels
The tick labels for the three axes. Defaults to argument at (proportions).
col.axis
Color of the triangular axes, ticks and labels.
cex.axis
Character expansion for axis labels.
cex.ticks
Character expansion for the tick labels.
align.labels
Logical - whether to align axis and tick labels with the axes.
show.grid
Whether to display grid lines at the ticks.
col.grid
Color of the grid lines. Defaults to gray.
lty.grid
Type of line for the grid.
show.legend
Logical - whether to display a legend.
label.points
Logical - whether to call thigmophobe.labels to label the points.
point.labels
Optional labels for the points and/or legend.
col.symbols
Color of the symbols representing each value.
pch
Symbols to use in plotting values.
...
Additional arguments passed to points.

Value

  • A list of the x,y positions plotted.

Details

triax.plot displays a triangular plot area on which proportions or percentages are displayed. An optional grid may also be displayed.

See Also

triax.points,triax.abline, thigmophobe.labels

Examples

Run this code
data(soils)
 triax.plot(soils[1:10,],main="DEFAULT")
 if(dev.interactive()) par(ask=TRUE)
 triax.plot(soils[1:10,],main="PERCENTAGES",
  tick.labels=seq(10,90,by=10),pch=3)
 main.title<- 
 triax.plot(soils[1:6,],main="GRID AND LEGEND",show.grid=TRUE,
  show.legend=TRUE,col.symbols=1:6,pch=4)
 if(dev.interactive()) par(ask=FALSE)

Run the code above in your browser using DataLab