how to plot 3d ternary plot for three mixtures

1.3k views Asked by At

I have tried with your terndemo but I'm unable get a graphical data like you sir. My aim is to present that how, each formulation is responsible for different zetasizes in 3d ternary plot. I tried like editing the file of yours but the result is different.

%% Three D plot for ZetaSize of oil, surfactant and cosurfactant isotropic mixture blends
experimental = [...
   20    60   20
   20    50   30
   20    40   40
   20    30   50
   20    20   60
   25    60   15
   25    50   25
   25    40   35
   25    30   45
   25    20   55
   30    60   10
   30    50   20
   30    40   30
   30    30   40
   30    20   50
   35    55   10
   35    45   20
   35    35   30
   35    25   40];
data = [...
   252.2
   120.4
   165.7
   178.3
   158.9
   322
   294.8
   265.5
   160.7
   431.9
   225.2
   416.3
   484.9
   458.2
   765
   362.2
   526
   331
   743.7];

A = experimental(:, 1)';
B = experimental(:, 2)';
C = 1 - (A + B);

ternsurf(A, B, data); 
ternlabel('oil', 'surf', 'cosurf***strong text***');
1

There are 1 answers

0
chthonicdaemon On

I've updated this to match your data. Note that the last row of your coordinates doesn't add to 100. I've divided it by 100 and plotted a pcolor plot rather than a 3D surface since I think it's clearer with your data. If you want a 3d surface, you just need to divide the data column by around 1000 to get the correct scale and use ternsurf.

%% Three D plot for ZetaSize of oil, surfactant and cosurfactant isotropic mixture blends
experimental = [...
   20    60   20
   20    50   30
   20    40   40
   20    30   50
   20    20   60
   25    60   15
   25    50   25
   25    40   35
   25    30   45
   25    20   55
   30    60   10
   30    50   20
   30    40   30
   30    30   40
   30    20   50
   35    55   10
   35    45   20
   35    35   30
   35    45   40   % this row doesn't add to 100 
]/100; 
data = [...
   252.2
   120.4
   165.7
   178.3
   158.9
   322
   294.8
   265.5
   160.7
   431.9
   225.2
   416.3
   484.9
   458.2
   765
   362.2
   526
   331
   743.7];

A = experimental(:, 1)';
B = experimental(:, 2)';
C = 1 - (A + B);

ternpcolor(A, B, data);
shading interp
ternlabel('oil', 'surf', 'cosurf');
colorbar

This results in the following plot:

Program output