%% Add Title and Axis Labels to Each Side
% Create a chart with two y-axes and add a title and axis labels to each side.
% Load the matrix hwydata from the example file accidents.mat. Create a scatter plot of the fifth column in hwydata against the left y-axis. Add a title and axis labels.

load('accidents.mat','hwydata')
ind = 1:51;
drivers = hwydata(:,5);
yyaxis left
scatter(ind,drivers)
title('Highway Data')
xlabel('States')
ylabel('Licensed Drivers (thousands)')

%
% Create a second scatter plot of the seventh column in hwydata against the right y-axis. Then, label the right y-axis.

pop = hwydata(:,7);
yyaxis right
scatter(ind,pop)
ylabel('Vehicle Miles Traveled (millions)')

% Copyright 2012 The MathWorks, Inc.