2296
Ternary Diagram in IDL New Graphics
This IDL procedure displays data as a ternary plot. As explained in:
http://en.wikipedia.org/wiki/Ternary_plot
"A ternary plot 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. In population genetics, it is often called a Gibbs triangle or a de Finetti diagram. In game theory, it is often called a simplex plot.
In a ternary plot, the proportions of the three variables a, b, and c must sum to some constant, K. Usually, this constant is represented as 1.0 or 100%."
The parameters that the routine accept are:
fa : fraction of composition A
fb : fraction of composition B
fc : fraction of composition C
names: array containing the names of the samples.
And the routine can be called as:
TERNARY_DIAG, fa, fb, fc, names
And example of the usage of this routine can be found in the same .pro file. Look for the "main" program in that file (Main Test Program: An Example). This main program is for example only purposes, you will need to remove it from the .pro file to use the TERNARY_DIAG routine with your own data.