%% Create Area Plot Using Horizontal Axis Values
% Define x as a vector of three car dealership IDs. Define Y as a matrix containing the number of cars sold per model. Display the values in the matrix in an area plot. Then add the axis labels and a legend.

x = [10 11 12];
Y = [21.6 25.4; 70.8 66.1; 58.0 43.6];
area(x,Y)
xlabel('Dealership ID')
ylabel('Sales')
legend({'Model A','Model B'})

%
% Set the tick marks along the x-axis to correspond to the values in x.

ax = gca; % current axes
ax.XTick = x;

% Copyright 2020 The MathWorks, Inc.