Page 196 - Computational Statistics Handbook with MATLAB
P. 196
Chapter 5: Exploratory Data Analysis 183
b(2*j) = cof*(-sin(th(j)*t));
end
% Project onto the vectors.
z(:,1) = x*a;
z(:,2) = x*b;
set(Hlin1,'xdata',z(1:50,1),'ydata',z(1:50,2))
set(Hlin2,'xdata',z(51:100,1),'ydata',z(51:100,2))
set(Hlin3,'xdata',z(101:150,1),'ydata',z(101:150,2))
drawnow
end
5.5 MATLAB Code
MATLAB has many functions for visualizing data, both in the main package
and in the Statistics Toolbox. Many of these were mentioned in the text and
are summarized in Appendix E. Basic MATLAB has functions for scatterplots
(scatter), histograms (hist, bar), and scatterplot matrices
(plotmatrix). The Statistics Toolbox has functions for constructing q-q
plots (normplot, qqplot, weibplot), the empirical cumulative distribu-
tion function (cdfplot), grouped versions of plots (gscatter,
gplotmatrix), and others. Some other graphing functions in the standard
MATLAB package that might be of interest include pie charts (pie), stair
plots (stairs), error bars (errorbar), and stem plots (stem).
The methods for statistical graphics described in Cleveland’s Visualizing
Data [1993] have been implemented in MATLAB. They are available for
download at
http://www.datatool.com/Dataviz_home.htm.
This book contains many useful techniques for visualizing data. Since
MATLAB code is available for these methods, we urge the reader to refer to
this highly readable text for more information on statistical visualization.
Rousseeuw, Ruts and Tukey [1999] describe a bivariate generalization of
the univariate boxplot called a bagplot. This type of plot displays the loca-
tion, spread, correlation, skewness and tails of the data set. Software
(MATLAB and S-Plus®) for constructing a bagplot is available for download
at
http://win-www.uia.ac.be/u/statis/index.html.
© 2002 by Chapman & Hall/CRC