how does the gplotmatrix color?

3 ビュー (過去 30 日間)
Jasmina Burek
Jasmina Burek 2018 年 1 月 26 日
コメント済み: Jasmina Burek 2018 年 2 月 1 日
gplotmatrix(OrigDataReduced,[],FinalAGClasses,[1 0 0; 0 0 0; 1 1 0; 0 0 0; 0 1 1; 0 0 0; 0.4940 0.1840 0.5560; 0 0 0; 0.3010 0.7450 0.9330; 0.6350 0.0780 0.1840; 0 0 0; 0 0 0],[],[20],false);
I want my plots to be colored in a specific order, but I don't understand in what order matlab assigns colors from FinalAGClasses - my numbers are: (I have 130 values with assigned class number).
class No
1 r [1 0 0]
4 k [0 0 0]
5 y [1 1 0]
10 k [0 0 0]
11 c [0 1 1]
16 k [0 0 0]
17 [0.4940 0.1840 0.5560]
18 k [0 0 0]
19 [0.3010 0.7450 0.9330]
20 [0.6350 0.0780 0.1840]
21 k [0 0 0]
22 k [0 0 0]

採用された回答

Gaurav Phatnani
Gaurav Phatnani 2018 年 2 月 1 日
>> gplotmatrix(x,y,group,clr,sym,siz,doleg)
The points specified by the 'x' and 'y' arguments of 'gplotmatrix' are categorized in groups using the third argument 'group'.
The points are colored based on the group they fall under. The color assigned to a group is the corresponding element in the 'clr' vector. For example, group 1 will be assigned the color 'clr(1)', group 2 will be 'clr(2)' and so on.
If the number of groups is greater than the number of elements in the 'clr' vector, the sequence repeats itself. For example, if there are 'n' groups and 'm' colors such that n>m then color of group 'm+1' will be 'clr(1)'
  1 件のコメント
Jasmina Burek
Jasmina Burek 2018 年 2 月 1 日
Thank you. I was confused because I used numbers only first so could not tell if it's by order or number value. But now when I replaced with text it is clear. Thank you

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with Statistics and Machine Learning Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by