MATLAB: “yyaxis left” not working on 2015b

bugbug 2015b yyaxis?bug r2015b yyaxisMATLABnot a bugr2015byyaxis

Hi,
I'd like to produce a scatter plot with two y axis, one on left and one on right side. I tried to follow an example from MathWorks website (topic: yyaxis) , but I get the following error: Undefined function or variable 'yyaxis'.
Is this a bug in the R2015b version?
Specifically, I followed this example:
load('accidents.mat','hwydata')
ind = 1:51;
drivers = hwydata(:,5);
yyaxis left
scatter(ind,drivers)
title('Highway Data')
xlabel('States')
ylabel('Licensed Drivers (thousands)')

Best Answer

No, this is NOT a bug. The bottom of the documentation page for YYAXIS states that this function was introduced in release R2016a. It is not present and will not work in earlier releases.