如何绘制三种混合物的 3d 三元图 [英] how to plot 3d ternary plot for three mixtures

查看:31
本文介绍了如何绘制三种混合物的 3d 三元图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已尝试使用您的 terndemo,但我无法获得像您这样的图形数据,先生.我的目标是展示每个公式如何在 3d 三元图中负责不同的 zetasize.我试着像编辑你的文件一样,但结果不同.

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***');

推荐答案

我已经更新了它以匹配您的数据.请注意,坐标的最后一行不会加到 100.我将它除以 100 并绘制了 pcolor 图而不是 3D 表面,因为我认为您的数据更清晰.如果你想要一个 3d 表面,你只需要将数据列除以 1000 左右以获得正确的比例并使用 ternsurf.

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

结果如下图:

这篇关于如何绘制三种混合物的 3d 三元图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆