www.gusucode.com > stats 源码程序 matlab案例代码 > stats/AdjustLinePropertiesInParallelCoordinatesPlotExample.m

    %% Adjust Line Properties in Parallel Coordinates Plot

%%
% Load the Fisher iris sample data.
load fisheriris

%%
% The data contains four measurements (sepal length, sepal width, petal
% length, and petal width) from three species of iris flowers. The matrix
% |meas| contains all four measurements for each of 150 flowers. The cell
% array |species| contains the species name for each of the 150 flowers.

%%
% Create a cell array that contains the name of each measurement variable
% in the sample data.
labels = {'Sepal Length','Sepal Width','Petal Length','Petal Width'};

%%
% Create a parallel coordinates plot using the measurement data in |meas|.
% Plot only the median, 25 percent, and 75 percent quartile values for each
% group identified in |species|. Label the horizonal axis using the
% variable names. Set the line width to 2.
parallelcoords(meas,'group',species,'labels',labels,... 
               'quantile',.25,'LineWidth',2)
           
%%
% Specifying |'LineWidth'| in this way sets the width of every line in the
% plot to 2.

%%
% Recreate the parallel coordinates plot, but this
% time, use handles to increase the width of only the line representing the
% median value for each measurement made on irises in the |setosa| group.
h = parallelcoords(meas,'group',species,'labels',labels,... 
               'quantile',.25)

%%
% The returned column vector |h| contains handles that correspond to each
% line object created by |parallelcoords|. For example, h(1) corresponds to
% the median line for the first grouping variable (|setosa|).

%%
% Use dot notation to increase the weight of the line showing the median
% value for each measurement made on irises in the |setosa| group.
h(1).LineWidth = 2;