Learn R Programming

⚠️There's a newer version (2.3.3) of this package.Take me there.

Ternary

'Ternary' is an R package that allows the creation of ternary plots (a.k.a. ternary graphs / simplex plots / Gibbs triangles / de Finetti diagrams) and Holdridge life zone diagrams using the familiar functions of the default 'graphics' package.

For simple use cases, generate ternary plots using the point-and-click Shiny app:

install.packages("Ternary")
Ternary::TernaryApp()

For greater control over your plots, use the R command line; usage instructions are available for Ternary plots (with an introductory vignette for R beginners), and for Holdridge plots.

Install the development version from GitHub with

devtools::install_github("ms609/Ternary", args = "--recursive")

This requires git to be installed and added to your PATH system environment variable. You may also require the 'curl' R package.

Please let me know of any feature requests or bugs by opening an issue on GitHub.

Citation

You can cite this package as:

Smith, Martin R. (2017). Ternary: An R Package for Creating Ternary Plots. Comprehensive R Archive Network, doi:10.5281/zenodo.1068996.

See also

The R package 'ggtern' implements ternary plots within the 'ggplot2' framework.

Please note that the 'Ternary' project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

Copy Link

Version

Install

install.packages('Ternary')

Monthly Downloads

1,201

Version

2.3.2

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Martin R. Smith

Last Published

July 25th, 2024

Functions in Ternary (2.3.2)

TernaryDensityContour

Add contours of estimated point density to a ternary plot
TernaryCoords

Convert ternary coordinates to Cartesian space
TernaryApp

Graphical user interface for creating ternary plots
TernaryXRange

X and Y coordinates of ternary plotting area
TernaryTiles

Paint tiles on ternary plot
TriangleCentres

Coordinates of triangle mid-points
TernaryContour

Add contours to a ternary plot
TernaryPlot

Create a ternary plot
TernaryPointValues

Value of a function at regularly spaced points
TriangleInHull

Does triangle overlap convex hull of points?
holdridgeClasses

Names of the 38 classes defined with the Holdridge system
XYToTernary

Cartesian coordinates to ternary point
.SetRegion

Set plotting region
cbPalettes

Palettes compatible with colour blindness
holdridge

Random sample of points for Holdridge plotting
ReflectedEquivalents

Reflected equivalents of points outside the ternary plot
HoldridgeHypsometricCol

Convert a point in evapotranspiration-precipitation space to an appropriate cross-blended hypsometric colour
HoldridgeToXY

Convert user-specified ternary coordinates into X and Y coordinates
ColourTernary

Colour a ternary plot according to the output of a function
HoldridgePlot

Plot life zones on a Holdridge plot
Polygon-Geometry

Polygon geometry
Annotate

Annotate points on a ternary plot
AddToHoldridge

Add elements to ternary or Holdridge plot
OutsidePlot

Is a point in the plotting area?
Ternary-package

The 'Ternary' package allows the creation of ternary plots (a.k.a. ternary graphs / simplex plots / Gibbs triangles / de Finetti diagrams) using the familiar functions of the default 'graphics' package.