ternary plot
{{short description|Barycentric plot on three variables}}
{{refimprove|date=January 2014}}
File:Flammability diagram methane.svg, showing which mixtures of methane, oxygen gas, and inert nitrogen gas will burn]]
A ternary plot, ternary graph, triangle plot, simplex plot, or Gibbs triangle is a barycentric plot on three variables which sum to a constant.{{Cite web|last=Weisstein|first=Eric W.|title=Ternary Diagram|url=https://mathworld.wolfram.com/TernaryDiagram.html|access-date=2021-06-05|website=mathworld.wolfram.com|language=en}} It graphically depicts the ratios of the three variables as positions in an equilateral triangle. It is used in physical chemistry, petrology, mineralogy, metallurgy, and other physical sciences to show the compositions of systems composed of three species. Ternary plots are tools for analyzing compositional data in the three-dimensional case.
In population genetics, a triangle plot of genotype frequencies is called a de Finetti diagram. In game theoryKarl Tuyls, "An evolutionary game-theoretic analysis of poker strategies", Entertainment Computing January 2009 {{doi|10.1016/j.entcom.2009.09.002}}, p. 9 and convex optimization,Boyd, S. and Vandenberghe, L., 2004. Convex optimization. Cambridge university press. it is often called a simplex plot.
In a ternary plot, the values of the three variables {{mvar|a}}, {{mvar|b}}, and {{mvar|c}} must sum to some constant, {{mvar|K}}. Usually, this constant is represented as 1.0 or 100%. Because {{math|a + b + c {{=}} K}} for all substances being graphed, any one variable is not independent of the others, so only two variables must be known to find a sample's point on the graph: for instance, {{mvar|c}} must be equal to {{math|K − a − b}}. Because the three numerical values cannot vary independently—there are only two degrees of freedom—it is possible to graph the combinations of all three variables in only two dimensions.
The advantage of using a ternary plot for depicting chemical compositions is that three variables can be conveniently plotted in a two-dimensional graph. Ternary plots can also be used to create phase diagrams by outlining the composition regions on the plot where different phases exist.
The values of a point on a ternary plot correspond (up to a constant) to its trilinear coordinates or barycentric coordinates.
Reading values on a ternary plot
There are three equivalent methods that can be used to determine the values of a point on the plot:
- Parallel line or grid method. The first method is to use a diagram grid consisting of lines parallel to the triangle edges. A parallel to a side of the triangle is the locus of points constant in the component situated in the vertex opposed to the side. Each component is 100% in a corner of the triangle and 0% at the edge opposite it, decreasing linearly with increasing distance (perpendicular to the opposite edge) from this corner. By drawing parallel lines at regular intervals between the zero line and the corner, fine divisions can be established for easy estimation.
- Perpendicular line or altitude method. For diagrams that do not possess grid lines, the easiest way to determine the values is to determine the shortest (i.e. perpendicular) distances from the point of interest to each of the three sides. By Viviani's theorem, the distances (or the ratios of the distances to the triangle height) give the value of each component.
- Corner line or intersection method. The third method does not require the drawing of perpendicular or parallel lines. Straight lines are drawn from each corner, through the point of interest, to the opposite side of the triangle. The lengths of these lines, as well as the lengths of the segments between the point and the corresponding sides, are measured individually. The ratio of the measured lines then gives the component value as a fraction of 100%.
A displacement along a parallel line (grid line) preserves the sum of two values, while motion along a perpendicular line increases (or decreases) the two values an equal amount, each half of the decrease (increase) of the third value. Motion along a line through a corner preserves the ratio of the other two values.
File:HowToCalculatePercentCompositions Altitude Method.svg|Figure 1. Altitude method
File:HowToCalculate%Compositions Intersection Method.gif|Figure 2. Intersection method
File:Ternary.example.1.svg|Figure 3. An example ternary diagram, without any points plotted.
File:Ternary plot example, constant lines horizontal.svg|Figure 4. An example ternary diagram, showing increments along the first axis.
File:Ternary plot example, constant lines parallel to the right.svg|Figure 5. An example ternary diagram, showing increments along the second axis.
File:Ternary plot example, constant lines parallel to the left.svg|Figure 6. An example ternary diagram, showing increments along the third axis.
File:Blank ternary plot.svg|Figure 7. Empty ternary plot
File:Ternary plot.svg|Figure 8. Indication of how the three axes work.
File:Triangle Plot - Major grid lines.svg|Unlabeled triangle plot with major grid lines
File:Triangle Plot - Major and minor grid lines.svg|Unlabeled triangle plot with major and minor grid lines
Derivation from Cartesian coordinates
:File:ternary plot visualisation.svg
Figure (1) shows an oblique projection of point {{math|P(a,b,c)}} in a 3-dimensional Cartesian space with axes {{mvar|a}}, {{mvar|b}} and {{mvar|c}}, respectively.
If {{math|a + b + c {{=}} K}} (a positive constant), {{math|P}} is restricted to a plane containing {{math|A(K,0,0)}}, {{math|B(0,K,0)}} and {{math|C(0,0,K)}}. If {{mvar|a}}, {{mvar|b}} and {{mvar|c}} each cannot be negative, {{math|P}} is restricted to the triangle bounded by {{math|A}}, {{math|B}} and {{math|C}}, as in (2).
In (3), the axes are rotated to give an isometric view. The triangle, viewed face-on, appears equilateral.
In (4), the distances of {{math|P}} from lines {{math|BC}}, {{math|AC}} and {{math|AB}} are denoted by {{math|a′}}, {{math|b′}} and {{math|c′}}, respectively.
For any line {{math|l {{=}} s + t n̂}} in vector form ({{math|n̂}} is a unit vector) and a point {{math|p}}, the perpendicular distance from {{math|p}} to {{math|l}} is
:
In this case, point {{math|P}} is at
:
Line {{math|BC}} has
:
\mathbf{\hat{n}} = \frac{\begin{pmatrix}0\\K\\0\end{pmatrix} - \begin{pmatrix}0\\0\\K\end{pmatrix}}{\left\|\begin{pmatrix}0\\K\\0\end{pmatrix} - \begin{pmatrix}0\\0\\K\end{pmatrix}\right\|} = \frac{\begin{pmatrix}0\\K\\-K\end{pmatrix}}{\sqrt{0^2+K^2+{(-K)}^2}} = \begin{pmatrix}0\\\frac{1}{\sqrt 2}\\-\frac{1}{\sqrt 2}\end{pmatrix} \,.
Using the perpendicular distance formula,
:
a' & = \left\| \begin{pmatrix}-a\\K-b\\-c\end{pmatrix} - \left( \begin{pmatrix}-a\\K-b\\-c\end{pmatrix} \cdot \begin{pmatrix}0\\\frac{1}{\sqrt 2}\\-\frac{1}{\sqrt 2}\end{pmatrix} \right) \begin{pmatrix}0\\\frac{1}{\sqrt 2}\\-\frac{1}{\sqrt 2}\end{pmatrix} \right\| \\[10px]
& = \left\| \begin{pmatrix}-a\\K-b\\-c\end{pmatrix} - \left( 0 + \frac{K-b}{\sqrt{2}} + \frac{c}{\sqrt{2}} \right) \begin{pmatrix}0\\\frac{1}{\sqrt 2}\\-\frac{1}{\sqrt 2}\end{pmatrix} \right\| \\[10px]
& = \left\| \begin{pmatrix}-a\\K-b-\frac{K-b+c}{2}\\-c+\frac{K-b+c}{2}\end{pmatrix} \right\| = \left\| \begin{pmatrix}-a\\\frac{K-b-c}{2}\\\frac{K-b-c}{2}\end{pmatrix} \right\| \\[10px]
& = \sqrt{{(-a)}^2 + {\left(\frac{K-b-c}{2}\right)}^2 + {\left(\frac{K-b-c}{2}\right)}^2} = \sqrt{a^2 + \frac{{(K-b-c)}^2}{2}} \,.
\end{align}
Substituting {{math|K {{=}} a + b + c}},
:
Similar calculation on lines {{math|AC}} and {{math|AB}} gives
:
This shows that the distance of the point from the respective lines is linearly proportional to the original values {{mvar|a}}, {{mvar|b}} and {{mvar|c}}.{{Cite web |last=Vaughan |first=Will |title=Ternary plots |url=http://wvaughan.org/ternaryplots.html |archive-url=https://web.archive.org/web/20101220111821/http://wvaughan.org/ternaryplots.html |url-status=dead |archive-date=December 20, 2010 |date=September 5, 2010 |access-date=September 7, 2010}}
Plotting a ternary plot
File:rectangular_ternary_plot.svg
Cartesian coordinates are useful for plotting points in the triangle. Consider an equilateral ternary plot where {{math|a {{=}} 100%}} is placed at {{math|(x,y) {{=}} (0,0)}} and {{math|b {{=}} 100%}} at {{math|(1,0)}}. Then {{math|c {{=}} 100%}} is and the triple {{math|(a,b,c)}} is
:
Example
File:SoilTexture_USDA.svg triangle from the United States Department of Agriculture ]]
This example shows how this works for a hypothetical set of three soil samples:
:
class="wikitable" style="text-align:center;"
!Sample | Clay | Silt | Sand | Notes |
Sample 1 | 50% | 20% | 30% | align="left"|Because clay and silt together make up 70% of this sample, the proportion of sand must be 30% for the components to sum to 100%. |
Sample 2 | 10% | 60% | 30% | align="left"|The proportion of sand is 30% as in Sample 1, but as the proportion of silt rises by 40%, the proportion of clay decreases correspondingly. |
Sample 3 | 10% | 30% | 60% | align="left"|This sample has the same proportion of clay as Sample 2, but the proportions of silt and sand are swapped; the plot is reflected about its vertical axis. |
=Plotting the points=
File:SoilTexture USDA.svg|lang=aa|Plotting Sample 1 (step 1):
Find the 50% clay line
File:SoilTexture USDA.svg|lang=ba|Plotting Sample 1 (step 2):
Find the 20% silt line
File:SoilTexture USDA.svg|lang=ca|Plotting Sample 1 (step 3):
Being dependent on the first two, the intersect is on the 30% sand line
File:SoilTexture USDA.svg|lang=da|Plotting all the samples
File:Ternary triangle plot of soil types sand clay and silt.svg|Ternary triangle plot of soil types sand clay and silt programmed with Mathematica
List of notable ternary diagrams
- Chromaticity diagram
- de Finetti diagram
- Dalitz plot
- Flammability diagram
- Jensen cation plot
- Piper diagram, used in hydrochemistry
- UIGS Classification diagram for Ultramafic rock
- USDA Soil texture diagram by particle sizes
See also
- Apparent molar property
- Viviani's theorem
- Barycentric coordinates (mathematics)
- Compositional data
- List of information graphics software
- Earth sciences graphics software
- IGOR Pro
- Origin (data analysis software)
- R has a dedicated package [https://cran.r-project.org/web/packages/Ternary/ ternary] maintained on the Comprehensive R Archive Network (CRAN)
- Sigmaplot
- Project triangle
- Trilemma
References
{{reflist}}
External links
{{Commons category|Ternary plots}}
- {{cite web|url=https://serc.carleton.edu/details/files/19001.html|title=Excel Template for Ternary Diagrams|publisher= Science Education Resource Center (SERC) Carleton College|work=serc.carleton.edu|access-date=14 May 2020}}
- {{cite web|url=https://www.lboro.ac.uk/microsites/research/phys-geog/tri-plot/index.html|title=Tri-plot: Ternary diagram plotting software
|publisher=Loughborough University – Department of Geography / Resources Gateway home > Tri-plot|work=www.lboro.ac.uk|access-date=14 May 2020}}
- {{cite web|url=https://www.ternaryplot.com/|title=Ternary Plot Generator – Quickly create ternary diagrams on line|work=www.ternaryplot.com|access-date=14 May 2020}}
- {{cite web|url=http://strata.uga.edu/8370/rtips/ternaryPlots.html|last1=Holland|first1=Steven|year=2016|title=Data Analysis in the Geosciences – Ternary Diagrams developed in the R language|publisher= University of Georgia|work=strata.uga.edu|access-date=14 May 2020}}
{{Chemical solutions}}