www.gusucode.com > graphics 案例源码程序 matlab代码 > graphics/SetYAxisTickLabelsBackToDefaultLabelsExample.m

    %% Set y-Axis Tick Labels Back to Default Labels
% Create a stem chart and specify the _y_-axis tick values and
% corresponding labels. Then, set the _y_-axis tick values and labels back
% to the default values.

stem(1:10)
yticks([1 4 6 10])
yticklabels({'A','B','C','D'})

%%
yticks('auto')
yticklabels('auto')