Page 159 - Computational Statistics Handbook with MATLAB
P. 159

146                        Computational Statistics Handbook with MATLAB


                             vates the same capability. One reason for looking at scatterplots of the data is
                             to look for interesting structures. The ability to view these structures for 3-D
                             data is dependent on the viewpoint or projection to the screen. When looking
                             at 3-D scatterplots, the analyst should rotate them to search the data for pat-
                             terns or structure.

                             Example 5.16
                             Three variables were measured on ten insects from each of three species
                             [Hand, et al.,1994]. The variables correspond to the width of the first joint of
                             the first tarsus, the width of the first joint of the second tarsus and the maxi-
                             mal width of the aedeagus. All widths are measured in microns. These data
                             were originally used in cluster analysis [Lindsey, Herzberg, and Watts, 1987].
                             What we would like to see from the scatterplot is whether the data for each
                             species can be separated from the others. In other words, is there clear sepa-
                             ration or clustering between the species using these variables? The 3-D scat-
                             terplot for these data is shown in Figure 5.25. This view of the scatterplot
                             indicates that using these variables for pattern recognition or clustering (see
                             Chapter 9) is reasonable.

                                % Load the insect data
                                load insect
                                % Create a 3-D scatter plot using a
                                % different color and marker
                                % for each class of insect.
                                % Plot the first class and hold the plot.
                                plot3(insect(1:10,1),insect(1:10,2),...
                                    insect(1:10,3),'ro')
                                hold on
                                % Plot the second class.
                                plot3(insect(11:20,1),insect(11:20,2),...
                                    insect(11:20,3),'gx')
                                % Plot the third class.
                                plot3(insect(21:30,1),insect(21:30,2),...
                                    insect(21:30,3),'b*')
                                % Be sure to turn the hold off!
                                hold off















                            © 2002 by Chapman & Hall/CRC
   154   155   156   157   158   159   160   161   162   163   164