SOM Toolbox Online documentation http://www.cis.hut.fi/projects/somtoolbox/

som_plotplane

Purpose

 Visualizes the map prototype vectors as line graph

Syntax

Description

  Visualizes the map prototype vectors as line graph

Known bugs

  It is not possible to specify explicit coordinates for map
  consistig of just one unit as then the msize is interpreted as
  map size.

Features

  - the colors are fixed: changing colormap in the figure (see
    COLORMAP) will not affect the coloring of the plots

Required input arguments

 lattice  The basic topology

   (string) 'hexa' or 'rect' positions the plots according to hexagonal or 
            rectangular map lattice.

 msize    The size of the map grid     

   (vector) [n1 n2] vector defines the map size (height n1 units, width n2 
            units, total M=n1 x n2 units). The units will be placed to their 
            topological locations in order to form a uniform hexagonal or 
            rectangular grid.   
   (matrix) Mx2 matrix defines arbitary coordinates for the M units.
            In this case the argument 'lattice' has no effect.

 topol    Topology of the map grid

   (struct) map or topology struct from which the topology is taken

 data     The data to be visualized

   (matrix) Mxd matrix of data vectors. 

Optional input arguments

 If unspecified or given empty values ('' or []), default values
 will be used for optional input arguments.

 color    The color of the plots

    (string) Matlab's ColorSpec (see help plot) string gives the same color 
             for each line.

    (matrix) Mx3 matrix assigns an RGB color determined by the Nth row of
             the matrix to the Nth plot. 

    (vector) 1x3 RGB vector gives the same color for each line.

 scaling  The data scaling mode

    (string) 'on or 'off': if scaling is set on, the data will be
             linearly scaled in each unit so that min and max values span from 
             lower to upper edge in each unit. If scaling is 'off', the proper 
             scaling is left to the user: values in range [-.5,.5] will be plotted 
             within the limits of the unit while values exceeding this
             range will be out of the unit.

 pos      Position of the origin          

    (vector) This is meant for drawing the plane in arbitary location in a 
             figure. Note the operation: if this argument is given, the
             axis limits setting part in the routine is skipped and the limits
             setting will be left to be done by MATLAB's
             defaults. By default no translation is done.

Output arguments

  h (scalar)  Handle to the created patch object

Object tag

 Object property 'Tag' is set to 'planePlot'.       

Examples

 %%% Create the data and make a map 

 data=rand(1000,20); map=som_make(data);

 %%% Create a 'gray' colormap that has 64 levels

 color_map=gray(64);

 %%% Draw plots using red color

 som_plotplane(map, map.codebook,'r');

 %%% Calculate hits on the map and calculate colors so that
     black = min. number of hits and white = max. number of hits

 hit=som_hits(map,data); color=som_normcolor(hit(:),color_map);

 %%% Draw plots again. Now the gray level indicates the number of hits to 
     each node

 som_plotplane(map, map.codebook, color);

See also

som_cplane Visualize a 2D component plane, u-matrix or color plane
som_barplane Visualize the map prototype vectors as bar diagrams.
som_pieplane Visualize the map prototype vectors as pie charts