ternary
Versione 1.1.0 (4,41 MB) da
Zhaoxu Liu / slandarer
ternary plot for MATLAB support plot fill scatter contour contourf text
% 初始化三元相图(Init ternary plot)
STA=STernary();
% 随机构造数据(Randomly generated data)
A=rand(1,50);
B=rand(1,50);
C=rand(1,50);
sz=rand(1,50);
% 绘制气泡图(Draw bubble chart)
STA.SBubblechart(A,B,C,sz,'CData',A);
% 初始化三元相图(Init ternary plot)
STA=STernary();
% 随机构造数据(Randomly generated data)
A=rand(1,30);
B=rand(1,30);
C=rand(1,30);
% STA.SContourf(A,B,C,[],15,'LineWidth',1);
% 获取核密度范围并等分(Obtain the range of ksdensity and divide it equally)
[~,Z]=STA.SContourf(A,B,C,[],15,'Visible','off');
levels=linspace(.5,max(max(Z)),15);
% 依据等值线绘制等高线及等高线填充(Draw contour and contourf by levels)
CfHdl=STA.SContourf(A,B,C,[],levels,'LineWidth',1);
CHdl=STA.SContour(A,B,C,[],levels,'LineWidth',1,'EdgeColor',[0,0,0]);
SHdl=STA.SScatter(A,B,C,40,'filled','CData',[0,0,0]);
% 绘制图例(Draw legend)
legend([CfHdl,CHdl,SHdl],{'contourf','contour','scatter'},'FontSize',14,'FontName','Cambria')
colormap(turbo)
% 初始化三元相图(Init ternary plot)
STA=STernary();
% 随机构造数据(Randomly generated data)
A=rand(1,500);
B=rand(1,500);
C=rand(1,500);
STA.SPcolor(A,B,C,10)
% STA.SScatter(A,B,C,5,'filled','CData',[0,0,0]);
colormap(summer)
Cita come
Zhaoxu Liu / slandarer (2024). ternary (https://www.mathworks.com/matlabcentral/fileexchange/127958-ternary), MATLAB Central File Exchange. Recuperato .
Compatibilità della release di MATLAB
Creato con
R2023a
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS LinuxTag
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Scopri Live Editor
Crea script con codice, output e testo formattato in un unico documento eseguibile.