I would like to plot a ternary phase diagram based on ab-initio energy inputs. There, I found a useful tool which may help me:
https://de.mathworks.com/matlabcentral/fileexchange/2299-alchemyst-ternplot
There are several issues I need to alter:
I like to see my input phase "name labels" on the plot, where I entered the coordinates in data. (Not just blue dots in separate figure)
I have entered positive energy values in terndemo.m, as shown in below. Nevertheless, they are actually negative values and when I entered negative values surface does not shown properly.
I need to give a label for the heat spectrum ?
Lastly, my axis labels are not starting correct. For instance 0 is not at the edge point in the triangle.
I also attached all questions on the figure.
Can anybody give some comments on that questions ?
--- Here is my demotern.m input:
%% Ti Ce Fe
% Name of the phases in coordinates below: Ti, Ce, Fe, FeTi, Fe2Ti,
% CeFe2,CeFe5, Ce2Fe17 and CeFe11Ti
experimental = [...
1.000 0.000 0.000
0.000 1.000 0.000
0.000 0.000 1.000
0.500 0.000 0.500
0.340 0.000 0.660
0.000 0.340 0.660
0.000 0.160 0.840
0.000 0.110 0.890
0.0765 0.0765 0.847
];
% data values are actually negative, here I enter positive value
data = [...
0.0
0.0
0.0
0.419
0.273
0.090
0.014
0.010
0.068
];
A = experimental(:, 1)';
B = experimental(:, 2)';
C = 1 - (A + B);
figure
subplot(2, 2, 1)
ternplot(A, B, C, '.'); ternlabel('Content of Titanium', 'Content of Cerium', 'Content of Iron');
subplot(2, 2, 2)
ternpcolor(A, B, data); ternlabel('Content of Titainum', 'Content of Cerium', 'Content of Iron');
shading interp
subplot(2, 2, 3)
terncontour(A, B, data); ternlabel('Content of Titanim', 'Content of Cerium', 'Content of Iron');
subplot(2, 2, 4)
ternsurf(A, B, data);
I am the author of ternplot
Here is the best that I can do:
ternpcolor
makes it hard to use negative values. There is a solution which involves viewing the figure from below, but I'll leave that for another question--
It comes out as below with no hand-editing:
But with a little tweaking (really just moving the labels around) it's quite usable: