Ternary Plot Explained: How to Make, Read and Analyze Compositional Data
A ternary plot is a triangle in which each point is a mixture of three parts that add up to a constant, such as soil sand, silt and clay, or the three main phyla in a gut microbiome. This guide explains how to read the triangle, why ordinary statistics on proportions can mislead, and how to compare groups with log-ratios and PERMANOVA.
What is a ternary plot?
A ternary plot (ternary diagram, triangle plot) displays three-part compositions. Each corner stands for 100% of one component and the opposite edge for 0%. A point near a corner is dominated by that component; a point in the middle is an even mixture. The plot is standard for soil texture, mineral and alloy composition, diet or tissue composition, formulation experiments and microbiome fractions.
Because the three shares add to 100%, two numbers determine the third, so the data really have two degrees of freedom. The triangle shows them without distortion.
How to read a ternary plot
- Read each component along its own axis. Gridlines parallel to the edge opposite a corner mark equal shares of that component.
- Points that move toward one corner increase that component and necessarily decrease the other two.
- Group centres and ellipses show where each group sits and how much it varies. Overlapping ellipses mean the groups are hard to tell apart.
Check the axis order and direction (clockwise or anticlockwise) in the figure note, because journals and soil-texture charts differ.
Why compositional data need log-ratios
When parts must add to a constant, an increase in one part forces decreases in others, which creates spurious negative correlations. Ordinary means, correlations and tests on raw shares can therefore mislead (Aitchison, 1986). Compositional data analysis works with ratios between parts. The isometric log-ratio (ilr) transform (Egozcue et al., 2003) turns a three-part composition into two ordinary coordinates, in which Euclidean distance equals the Aitchison distance.
The Ternary Plot Generator computes group centres as closed geometric means and draws confidence ellipses in ilr space and maps them back onto the triangle. Zeros are a problem because log(0) is undefined; replace them with a small value or merge parts before analysis.
Test group differences with PERMANOVA
To ask whether groups differ in composition, run PERMANOVA (Anderson, 2001) on the Aitchison distance. It partitions the variation into between-group and within-group sums of squares, gives a pseudo-F and R² (the share of variation explained by the grouping), and obtains the p-value by permuting group labels. Report the number of permutations. PERMANOVA assumes similar dispersion across groups; a significant result with very different spread may reflect dispersion rather than centre location.
Step by step: make a ternary plot in StatFas
- Open the Ternary Plot Generator.
- Load the example data (60 invented microbiome samples), paste a table, or upload a CSV, Excel or SPSS file with three non-negative columns and an optional group column. Rows are re-scaled to sum to 100%.
- Choose the three component columns (A at the top, B bottom left, C bottom right), the group to colour by, and options such as the compositional centre per group, 95% log-ratio ellipses and grid spacing.
- Run the analysis for centres, descriptive statistics and PERMANOVA with APA7 interpretation.
- Style the figure, then log in (free) to download it, the tables and a Word report.
The tutorial shows the same plot in SPSS (limited), R, Python and others.
How to report it in APA7
Describe the closing of the data, the transformation, the distance, the test and the permutations. Example wording (illustrative numbers):
Common mistakes to avoid
- Running t tests or ANOVA on raw proportions as if they were independent.
- Leaving zeros in the data and taking logs.
- Forgetting to say which component is on which axis.
- Reading PERMANOVA significance as a difference in means when group spreads differ.
Frequently asked questions
Do my three columns have to add to 100?
No. The generator re-scales each row so that its three parts add to 100% before plotting.
What if I have more than three components?
Combine them into three meaningful groups (for example Firmicutes, Bacteroidetes, other), or use a method for higher-dimensional compositions such as PCA on clr-transformed data.
Can I plot soil texture classes?
Yes, if your sand, silt and clay columns sum to 100%. The generator draws the triangle; add class boundaries in an image editor if you need a named texture chart.
What does R² mean in PERMANOVA?
It is the proportion of total variation in the (Aitchison) distance matrix explained by the grouping, analogous to R² in regression.
Related tools, guides and tutorials
- Tutorial: ternary plot in StatFas, SPSS, R and Python
- Pie chart maker
- Bar plot maker
- Pie chart tutorial
- Descriptive statistics calculator
- MANOVA explained
- Principal component analysis explained
- Frequency analysis explained
- One-way ANOVA calculator
- PCA Biplot Generator
- Parallel Coordinates Plot Generator
- 3D Scatter Plot Generator
- All tutorials
- All blog posts
References
- Aitchison, J. (1986). The statistical analysis of compositional data. Chapman & Hall.
- American Psychological Association. (2020). Publication manual of the American Psychological Association (7th ed.).
- Anderson, M. J. (2001). A new method for non-parametric multivariate analysis of variance. Austral Ecology, 26(1), 32–46.
- Egozcue, J. J., Pawlowsky-Glahn, V., Mateu-Figueras, G., & Barceló-Vidal, C. (2003). Isometric logratio transformations for compositional data analysis. Mathematical Geology, 35(3), 279–300.