views:

775

answers:

3

I need to draw ternary/triangle plots representing mole fractions (x, y, z) of various substances/mixtures (x + y + z = 1). Each plot represents iso-valued substances, e.g. substances which have the same melting point. The plots need to be drawn on the same triangle with different colors/symbols and it would be nice if I could also connect the dots.

I have looked at matplotlib, R and gnuplot, but they don't seem to be able to draw this kind of plot. The 3rd party ade4 package for R seems to be able to draw it, but I'm not sure if I can draw multiple plots on the same triangle.

I need something that runs under Linux or Windows. I'm open to any suggestions, including libraries for other languages, e.g. Perl, PHP, Ruby, C# and Java.

A: 

Find a vector drawing library and draw it from scratch if you can't find an easier way to do it.

CookieOfFortune
I have thought of this, too, but it would be too much (grunt) work. There are many details that have to be figured out, e.g. the locations of the axes labels or tick marks.Btw, Phil's solution is basically drawing the plot from scratch.
Cristian Ciupitu
+1  A: 
Phil H
It looks interesting, but I'm having problems with the last command. I had to modify (truncate) it. I'll investigate it further. Thank you.
Cristian Ciupitu
+2  A: 
doug
It definitely looks interesting, too bad it has so many dependencies which I don't have on my Fedora 12 machine :-( Anyway thank you for answering and +1 from me.
Cristian Ciupitu
that's too bad--i think you might have enjoyed using that library otherwise. (Quite a coincidence that when i was typing my answer above, i was sitting in the Bucharest airport on my way back to Spain from a climbing trip in the gorgeous Fagaras mountains.) I don't think i have the rep to add an 'r' tag to your Q, so if you agree, perhaps add that tag when you have a chance.
doug
I managed to install it on Fedora 12 by running R and typing at the R prompt `install.packages(c("vcd"))`. Also the examples from the `ternaryplot` manual page worked like a charm. Thank you again! As for the `r` tag, I haven't noticed your comment, otherwise I would have added it myself. P.S.: I'm glad that you enjoyed your climbing trip.
Cristian Ciupitu