www.gusucode.com > stats 源码程序 matlab案例代码 > stats/CustomizethePlotDisplayExample.m
%% Customize the Plot Display % Copyright 2015 The MathWorks, Inc. %% % Load the sample data. Create data vector |x| from the first column of % the data matrix, which contains sepal length measurements from three different % species of iris flowers. Create data vector |y| from the second column % of the data matrix, which contains sepal width measurements from the same % flowers. load fisheriris.mat; x = meas(:,1); y = meas(:,2); %% % Create a scatter plot and six kernel density plots to visualize the relationship % between sepal length and sepal width as measured on three species of iris % flowers, grouped by species. Customize the appearance of the plots. scatterhist(x,y,'Group',species,'Location','SouthEast',... 'Direction','out','Color','kbr','LineStyle',{'-','-.',':'},... 'LineWidth',[2,2,2],'Marker','+od','MarkerSize',[4,5,6]);