www.gusucode.com > graphics 案例源码程序 matlab代码 > graphics/SpecifyYAxisTickValuesAndLabelsExample.m
%% Specify y-Axis Tick Values and Labels % Create a line plot. Display tick marks along the _y_-axis at the values % 0, 50, and 100. Then, specify a label for each tick mark. x = linspace(0,10); y = x.^2; plot(x,y) yticks([0 50 100]) yticklabels({'y = 0','y = 50','y = 100'})