Ternary plot in MATLAB

조회 수: 17 (최근 30일)
Farshad Daraei Ghadikolaei
Farshad Daraei Ghadikolaei 2020년 10월 19일
댓글: Farshad Daraei Ghadikolaei 2020년 10월 19일
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
Farshad Daraei Ghadikolaei 2020년 10월 19일
Thanks Rik for your time. Actually I am looking for plotting like the attached graph.
Farshad Daraei Ghadikolaei
Farshad Daraei Ghadikolaei 2020년 10월 19일

댓글을 달려면 로그인하십시오.

카테고리

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