Ternary plot in MATLAB
17 ビュー (過去 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.
0 件のコメント
回答 (1 件)
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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Annotations についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!