PRTools contents

PRTools manual

scatterd

SCATTERD

Display scatterplot

    H = SCATTERD(A)
    H = SCATTERD(A,DIM,S,CMAP,FONTSIZE,'label','both','legend','gridded')

Input
 A Dataset or matrix
 DIM Number of dimensions: 1,2 or 3 (optional; default: 2)
 S String specifying the colors and markers (optional)
 CMAP Matrix with a color map (optional)

Output
 H Vector of handles

Description

SCATTERD(A) displays a 2D scatterplot of the first two features of the  dataset A. If the number of dimensions DIM is specified (1..3), it plots  the first D features in a D-dimensional plot (D<4). If the plot string S is provided, e.g. S = 'w+', all points are plotted accordingly. If given,  different plot strings are used for different classes. See PLOT for the  specification of plot strings.

If CMAP is specified, the color of the object symbols is determined by  CMAP indexed by the object labels. A colormap has the size [C x 3], where  C is the number of classes. The three components of CMAP(I,:) determine  the red, green and blue components of the color. For instance

     MAP = HSV; [M,K] = SIZE(A); LABELS = CEIL(64*[1:M]'/M); 
    A = DATASET(A,LABELS); SCATTERD(A,'.','COLORMAP',MAP);

This may be used for tracking ordered objects.

FONTSIZE may be a vector with three elements: fontsize, markersize and  size of the label font in case of a label plot.

Various other options are
    'LABEL' : plot labels instead of symbols
    'BOTH' : plot labels next to each sample
    'LEGEND' : place a legend in the figure
    'GRIDDED': make a grid of 2D scatterplots of each pair of features

All the parameters, except for the dataset A can be specified in any  order or can be left out.

Classifiers can be plot in the scatterplot by PLOTC.  Note that PLOTC does not work for 1D and 3D scatterplots.

Example(s)

prex_confmat, prex_density, prex_plotc, prex_mcplot,

See also

datasets, colormap, plot, plotc,

PRTools contents

PRTools manual