Ternary plot in MATLAB

14 次查看(过去 30 天)
Hello all,
I have a .csv file contain 3 columns with 500,000 rows. could you please help me to plot these three columns in one graph, like ternary plot. I already tried to do this by using ternary plot, but due to high number of rows and too much duplicate numbers it is not possible to plot as ternary plot. Each column has different ranges of data. For example the first column's data ranges are from 0.01 to 0.17, the second column 0.045 to 0.96, and the third colum 0 to 100.

回答(1 个)

Rik
Rik 2020-10-19
The TrianglePlot function I posted on the FEX seems to work just fine (although I decreased the number of points for this example).
%store the ranges
r_a=[0.01 0.17];
r_b=[0.045 0.96];
r_c=[0 100];
%generate random data - replace this with your actual data
a=rand(500,1);a=r_a(1)+a*diff(r_a);
b=rand(size(a));b=r_b(1)+b*diff(r_b);
c=rand(size(a));c=r_c(1)+c*diff(r_c);
%normalize each variable
a2=(a-r_a(1))/diff(r_a);
b2=(b-r_b(1))/diff(r_b);
c2=(c-r_c(1))/diff(r_c);
points=[a2 b2 c2];
TrianglePlot(points,'--.')
  4 个评论
Farshad Daraei Ghadikolaei
Thanks Rik for your time. Actually I am looking for plotting like the attached graph.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Annotations 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by