% Example 10.4

% Shows identification on scatterplots.
load animal
% Plot BrainWeight against BodyWeight.
scatter(log(BodyWeight),log(BrainWeight))
xlabel('Log Body Weight (log grams)')
ylabel('Log Brain Weight (log grams)')
% Change the axis to provide more room.
axis([0 20 -4 11])
% Need to convert animal names to string matrix.
% Input argumen must be string matrix.
cases = char(AnimalName);
gname(cases)

% Now let's look at scattergui.
% The data used in the text is saved in example104.mat.
load L1bpm
% Reduce the dimensionality using Isomap.
options.dims = 1:10;    % These are for ISOMAP.
options.display = 0;
[Yiso, Riso, Eiso] = isomap(L1bpm, 'k', 7, options);
% Get the data out.
X = Yiso.coords{2}';
scattergui(X,classlab)
% Right click on the axes, and a list box comes up.
% Select one of the classes to highlight.
