SOM Toolbox Online documentation


color = som_normcolor(data, clrmap)

SOM_NORMCOLOR RGB values of indexed colors for a given dataset and colormap 
 color = som_normcolor(data, [clrmap])

  color = som_normcolor(data);
  color = som_normcolor(data,jet(64));

  Input and output arguments ([]'s are optional):
   data     (struct) map or data struct
            (matrix) size N x dim
   [clrmap] (matrix) size N x 3, a valid colormap (an RGB value matrix)
                     Default is current colormap. See COLORMAP.

   color    (matrix) size N x 3 x dim, RGB matrix 

 Purpose of this function is to calculate fixed RGB colors that are similar
 to indexed colors with the specified colormap. This is because some
 SOM Toolbox visualization functions (as SOM_GRID) do not use indexed colors 
 if the underlying Matlab function (e.g. PLOT) do not use indexed colors


 %%% Visualize three variables in a map using som_grid:
 %%% Give coordinates for the markers according to variables 1 and 2, and 
 %%% 'indexed colors' according to variable 3. 

 som_grid(map.topol.lattice,map.topol.msize,'Coord',map.codebook(:,1:2), ...
          'markercolor', som_normcolor(map.codebook(:,3)));

[ SOM Toolbox online doc ]