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

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

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

%%
xticks('auto')
xticklabels('auto')