Code covered by the BSD License  

Highlights from
GTL jetfuel_ternplot with neural network

image thumbnail

GTL jetfuel_ternplot with neural network

by

 

This is an upgrade of the ternplot code written by Carl Sandrock (ID#2299).

ternplot(A, B, C, varargin)

function handles = ternplot(A, B, C, varargin)

majors = 10;

if nargin < 3
   C = 1 - (A+B);
    
end;

[fA, fB, fC] = fractions(A, B, C);

[x, y] = terncoords(fA, fB, fC);

% Sort data points in x order
[x, i] = sort(x);
y = y(i);

% Make ternary axes
[hold_state, cax, next] = ternaxes(majors);

% plot data
q = plot(x, y, varargin{:});
if nargout > 0
    hpol = q;
end
if ~hold_state
    set(gca,'dataaspectratio',[1 1 1]), axis off; set(cax,'NextPlot',next);
end
view(180, -90);

Contact us