Borrar filtros
Borrar filtros

how does the gplotmatrix color?

4 visualizaciones (últimos 30 días)
Jasmina Burek
Jasmina Burek el 26 de En. de 2018
Comentada: Jasmina Burek el 1 de Feb. de 2018
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]

Respuesta aceptada

Gaurav Phatnani
Gaurav Phatnani el 1 de Feb. de 2018
>> 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 comentario
Jasmina Burek
Jasmina Burek el 1 de Feb. de 2018
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

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by