1 2 Previous Next 19 Replies Latest reply on Oct 31, 2015 9:53 PM by Antonio Buono

# Ternary Plots

Hi,

in quite a few branches of science ternary plots (http://en.wikipedia.org/wiki/Ternary_plot) are a very useful way to illustrate mixtures between 3 end members. Any way this can be done in tableau?

Cheers,

Dani

• ###### 1. Re: Ternary Plots

Not easily (if at all) - what would the data look like going into one?

• ###### 2. Re: Ternary Plots

that wikipedia link has an example (copied below). One could maybe "abuse" a normal scatter plot for this by re-projecting, but that would not be very pretty. Or maybe one could (ab)use a map plot, again through re-projecting.Something similar is done on http://wvaughan.org/ternary-plot.xls

Sample #     Organic matter     Clay     Sand     Notes

Sample 1     80%     10%     10%     Because organic matter and clay make up 90% of this sample, the proportion of sand must be 10%.

Sample 2     50%     40%     10%     The proportion of sand is 10% in this sample too, but the proportions of organic matter and clay are different.

Sample 3     10%     40%     50%     This sample has the same proportion of clay as in Sample 2 does, but because it has a smaller proportion of organic matter, the proportion of sand must be larger, because all samples' proportions must sum to 100%

• ###### 3. Re: Ternary Plots

That is what I was thinking - XY or map with a background. No other way to do it I don't think. With a map you may be able to use shapefiles to define areas.

1 of 1 people found this helpful
• ###### 4. Re: Ternary Plots

I imagine that doing a calculation outside of Tableau to generate the paths for custom polygons could work. Jerome Cukier created a tree map in Tableau doing that sort of thing: http://www.jeromecukier.net/blog/2012/04/19/treemaps-in-tableau-can-be-done/

1 of 1 people found this helpful
• ###### 5. Re: Ternary Plots

This looks like it could do the trick. Thanks! Native tableau implementation  would be better as it would take care of axes labeling, tick marks etc.

Somewhat related to this: How do I combine plot types? I have an example data set below. X&Y could be used to make the triangle polygon, X2 and Y2 should then be plotted over it as points. This must be trivial, but I only manage to make either polygons or points (I am brand new tableau) ....

X     Y      X2      Y2

0      0     0.2     0.1

1      0     0.5     0.4

.5     1

0      0

• ###### 6. Re: Ternary Plots

There's a bit of ugliness with null values in order to draw the data as polygons on top of the axes as lines - but it's native Tableau so you get tooltips and stuff.

I've attached the spreadsheet with the data for the axes and dummy shapes and the original workbook without extracts so you can see how it works.

• ###### 7. Re: Ternary Plots

Nice Richard.

• ###### 8. Re: Ternary Plots

Nice! With the exception that the barycentric coordinates are not shown along the subvertical  triangle edges this is near perfect. Thanks a lot!

(forget about my questions regarding how to plot different types of data on the same graph, I start to get the hang of it, dual axis, multiple marks, ...)

• ###### 9. Re: Ternary Plots

Impressive!

• ###### 10. Re: Ternary Plots

I did play with putting the coordinates in along the edges using labels:

That looked fine with just the axes, but as soon as I tried overlaying the data with the dual axis I got labels up that vertical line at x=0. You might be able to suppress them with a bit more effort, but I didn't have the time to try...

• ###### 11. Re: Ternary Plots

I had another quick play with putting the coordinates in - I realised I could just suppress the null values with:

Analysis->Special Values->Hide

That works well and it ends up looking fine. I republished to Public, so the embedded viz above now has coordinates. It also has scroll bars but I couldn't be bothered to fix that.

I had to mess around with the order of the data points to get the coordinates to display correctly, so I've attached the updated spreadsheet.

I also experimented with the axis grid with and without nodes at all of the intersections of the grid. I think it works better with them there - the tooltips on mouse-over (and the different coloured grid lines) really helped me navigate the grid - I think it would take a while till you could read one of these at a glance.

• ###### 12. Re: Ternary Plots

the coordinates on the left side are wrong, i.e. inverted.  They should be the same as on the right side, increasing to the top of the triangle. otherwise this is fantastic! thanks again.

• ###### 13. Re: Ternary Plots

No, it has to be cyclic like that otherwise the apex would be 200%.

Here's an image from that Wikipedia article you pointed to in the original post.

• ###### 14. Re: Ternary Plots

ok, my mistake, I should have checked this better. I have never seen it used this way. Searching around a bit shows that it is indeed often used the way you have implemented it. So I learned something. The way I usually use it is shown in the picture below (from the same webpage). These diagrams are used to, for example, show the properties of a sedimentary rock. The main constituents are clay and sandstone. I can put any mixture between the two of them as a point on the baseline, with 100=all sandstone and 0=no sandstone (i.e. 100 clay). If these rock also contains organic material then we need the other dimension/direction. If we have 100 organic material then we have no clay or sandstone.

another example is

1 2 Previous Next