(Translated by https://www.hiragana.jp/)
Ternary plots
The Wayback Machine - https://web.archive.org/web/20101220111821/http://wvaughan.org:80/ternaryplots.html

Ternary plots


A ternary, or triangle, plot uses a triangle to display the proportions of three variables that sum to a constant. The word "ternary" comes from the Latin adjective "ternarius", "having three parts". Ternary plots are particularly useful in mineralogy and petrology. For example, the mineral chemistry of pyroxene-the proportions of Mg, Fe, and Ca occupying octahedral sites-can be visualized in a simple way on a ternary plot. In this page, I'll talk about the theory of the ternary plot and then provide some Excel spreadsheets for easy ternary plotting.

Consider three variables called A, B, and C. We can visualize the values these variables take in 3D. This isn't very useful, however: we'd like to plot our variables in 2D so our plot can be reproduced on a screen or a sheet of paper. If there's some sort of constraint on our three variables, we don't necessarily need all three. For instance, think of the positions of points on the surface of the Earth: we could specify points with a rectangular coordinate system, x, y, and z with an origin at the center of the Earth, but since the Earth is (more or less) a sphere, every point on the Earth is a constant distance from the Earth's center, or x^2 + y^2 + z^2 = c. So it suffices to give x and y to locate points on the surface of the Earth. (Well, actually, it narrows the point down to two possible positions, in general. This is due to a crummy choice of coordinate system that fails to exploit spherical symmetry: latitude and longitude can uniquely specify points on the Earth's surface.)

So if there's a constraint on our variables, we might be able to make a lower-dimensional plot. If we're plotting chemical or compositional data, there's a very natural constraint: the proportions of components in a three component mixture sum to 1. Also, no component can take negative values or values greater than 1. So we have three components, A, B, and C, that take values a, b, and c, and a + b + c = 1, and 0 =< a, b, c =< 1. If we take A, B, and C as the axes of a rectangular coordinate system, this is the equation of a segment of a plane. Every possible composition, every possible combination of components, lies on this plane segment. Look at Figure 1 below.

Plane segment viewed obliquely

Figure 1 is a 2D visualization, and I guess, strictly speaking, a ternary plot, but it's not a very useful one. Because of foreshortening, the relationship of values on this ternary plot is distorted. The solution is clear: change our perspective! If we move so that we're looking straight down the centroid of the equilateral triangle (i.e. the plane segment), so that the axes spread out equigonally, we are looking at an undistorted 2D representation of our data. Look at Figure 2. This is the idea of the ternary plot!

Plane segment viewed straight on

There's another problem. The foreshortening from before also meant we couldn't quantitatively tell what (a, b, c) some plotted value corresponded to. How can we figure out what (a, b, c) a plotted value corresponds to on this plot? First, how would we do it in 3D? We'd resolve the point into A, B, and C components (see Figure 3).How does this look on the ternary plot? Look at Figure 4 and think about it: each of the lines I drew, the altitudes dropped to the sides of the triangle, are the projection lines from Figure 3! So the length of these lines give a, b, and c. Now, there's an easy way to read the values straight off the plot with a minimum of measurement: draw line segments on the plot formed by intersecting planes of constant A, B, or C with the a + b + c = 1 plane. Look at the segments of constant C in figure 5. If a point falls on one of these segments, we know its c. In the example, we see that the point is about halfway between 4/7 and 5/7 c; it has a c value of about 9/14. (The constant c = 1 segment is just a point, which makes sense since a and b must be fixed at 0, and the c = 0 segment is the longest segment, which makes sense since a and b can vary the most in composition.) Then imagine constant a and constant b segments on this graph, combined outlining a grid of equilateral triangles (if the segments are spaced at the same scale) from which it's easy to read the a, b, and c of any point on the diagram. (Aside: it's easy to get mixed up and think that the places where altitude dropped from the plotted point touch the sides of the triangle give the values of the variable. They don't, but they do show the relative proportions of the other two variables. Do you see what I mean, and why that's true?)

Graphically resolving plotted values into components

So we've made an undistorted, easy-to-read 2D visualization of the values of three variables related by a constraint. This is the ternary plot. Here are a few things to think about: 1) assigning boundaries to ternary plot regions. A mineral chemistry example is the pyroxene ternary plot I mentioned above. Pyroxenes with more than 50% Ca have a different crystal structure and are not actually classified as pyroxenes. So the typical pyroxene plot is really a quadrilateral plot: an equilateral triangle with the top part (a whole quarter, thinking of the Triforce) lopped off. Classification is as easy as divvying up the plot. On Wikipedia, there are examples of ternary plots used for flammability diagrams, showing when mixtures of three gases are flammable: a more "eye-popping" way to make these diagrams might be by forgetting about drawing the equilateral triangle and outlining the flammable region with an appropriately shaped polygon: then mixtures that fall inside are flammable and outside are not flammable. 2) using ternary plots to solve problems with variables that take discrete values. In this case, the "grid of equilateral triangles" structure is enforced! An interesting example of using ternary plots to solve the "three glasses" problem can be found here: http://www.cut-the-knot.org/triangle/glasses.shtml 3) Perspective distortions of ternary plots to accentuate some feature of the diagram, at the cost of linear scale. A ternary plot used for lunar plagioclases could be tilted to accentuate the An part of the An/Na (albite) boundary line (since lunar plagioclases are generally very anorthositic).

Finally, I've created two Excel spreadsheets for ternary plots which you can find below. The first is a normal ternary plot; the second, for pyroxene mineralogy, is a ternary quadrilateral plot with the top-half quarter chunk removed. I transform plot coordinates (so-called barycentric, although the "mass" here reflects the weighting of the areas from the perspective distortion) into x, y Cartesian coordinates and then plot them on an x, y scatterplot. The constant-value segments come from connecting appropriately chosen points with trendlines. Download the spreadsheets for more details if you're interested. The c axis is rescaled to y and the b axis + c axis together figure out the rise which is used to calculate the run of x.

Ternary plot (.xls)
Ternary quadrilateral plot (.xls)


Back to wvaughan.org
Will Vaughan. Last revision September 6, 2010.