No BSD License  

Highlights from
Ternplot

4.52632

4.5 | 19 ratings Rate this file 71 Downloads (last 30 days) File Size: 129.02 KB File ID: #2299
image thumbnail

Ternplot

by Carl Sandrock

 

28 Aug 2002 (Updated 10 Jan 2007)

Plots ternary phase data on a ternary phase diagram.

| Watch this File

File Information
Description

Acts like plot (responds to hold, etc), also includes ternlabel.m to label all three axes.

Acknowledgements
This submission has inspired the following:
Schlee.m, Folk_S_Classification, Shepard_Ternary_Plot, Starplot
MATLAB release MATLAB 7.3 (R2006b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (23)
17 Jun 2003 A. Schumann

These 2 routines do exactly what I've been looking for hours now. Thanks !

21 Aug 2003 Aanhanger...:) NOT!!!!!!!!!

Die massa toets was nie funny nie.
Ek is nie 'n student in jou klas nie, maar ek
het gehoor....
damnit

14 Nov 2003 W Jirat

Very useful and amazing work.

28 Nov 2003 joe salisbury

thanks!

02 Oct 2004 Priam Pillai

Excellent program. I used it for my lab reports works great.

23 Oct 2004 B N

excellent,
thanks a lot

11 Nov 2004 roxxot jang

THANKS

28 Dec 2004 John Dow

It's really cool!
it would be nice to have an option to draw more than one graph on the same figure. (hold on, hold off)

10 Feb 2005 Yash Mahendra

Thank you so much!! It's a boon for chem engg students!

09 Jan 2006 Karel Verscheure

Excellent work! Maybe someone can extend this to make advanced contourplots (liquidus surfaces in color etc.)?

25 Jan 2006 soroush taghinejad  
03 May 2006 Marcela edith  
11 Nov 2006 Wolfgang Mozart

Excellent work! Have you an Idea to get 3D ternary phase plot?

11 Nov 2006 Wolfgang Mozart

I've been trying to use your solution for my data in excel file. I exported my data into matlab, but I got two errors:
??? Input argument "A" is undefined.

Error in ==> ternplot at 40
    C = 1 - (A+B);

??? Input argument "A" is undefined.

Error in ==> ternlabel at 18
r(1) = text(0.35*sin(deg2rad(30)), 0.5, A, 'rotation', 60, 'horizontalalignment', 'center');
How can I solve this problem?

08 Aug 2007 parvez alam  
21 Oct 2007 Giuseppe Cardillo

Your work is excellent. Anyway there is a bug in ternplot.
Change line 33 in
function hpol = ternplot(A, B, C, varargin)
or, in alternative, change line 55 in
handles = q;

31 Jul 2008 Catherine Klapperich  
27 Apr 2011 hamid mehdizadeh  
10 May 2011 Julia

When I used ternplot some of my points are off the grid (outside the triangle) and I haven't been able to figure out the cause. Has this happened to anyone else? Can anyone help me fix the problem?

Thanks!

18 May 2011 Leonid  
03 Jun 2011 Anthony Pollington

I'm pretty sure that vertexlabel.m is not working quite correctly. If the data input using ternplot is
% b
% / \
% / \
% c --- a

% this function plots
% c
% / \
% / \
% a --- b

% and the vertex labelling needs to be input as vertexlabel(C,A,B)

14 Jun 2011 Julia

I need to make Piper trilinear diagrams using matlab. The ternary phase diagram is great, but it is only part of the Piper trilinear diagram (used to plot hydrogeochemical facies). Does anyone know how to create a Piper trilinear diagram in matlab?

30 Jun 2011 Dominique

Thanks a lot, it works really well. I would like to plot tie-lines as well. Do you have any idea how I can do that?

Please login to add a comment or rating.
Updates
10 Jan 2007

Often requested features added -- terncontour and ternsurf for three-dimensional plots contributed by Peter Selkin. Plotting order (a, b, c) is now more standard. More modular design.

Tag Activity for this File
Tag Applied By Date/Time
specialized Carl Sandrock 22 Oct 2008 06:50:39
plotting Carl Sandrock 22 Oct 2008 06:50:39
ternary Carl Sandrock 22 Oct 2008 06:50:39
phase Carl Sandrock 22 Oct 2008 06:50:39
diagram Carl Sandrock 22 Oct 2008 06:50:39
triangle Carl Sandrock 22 Oct 2008 06:50:39
triangular Carl Sandrock 22 Oct 2008 06:50:39
plot Carl Sandrock 22 Oct 2008 06:50:39
diagram Victor Oyeyemi 23 Nov 2008 17:13:46
phase Victor Oyeyemi 23 Nov 2008 17:13:49
diagram Abraham 04 Jun 2009 17:48:34
diagram Jorge Soto 18 Sep 2010 18:15:44
ternary Konrad Krakowiak 05 Jul 2011 22:02:31
ternary Jang Min Park 15 Jul 2011 12:27:58
plot Vinay Babu 12 Oct 2011 12:23:46
diagram Sergio 25 Jan 2012 22:31:57

Contact us at files@mathworks.com