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

查看:58
本文介绍了如何绘制三种混合物的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天全站免登陆