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

    %% Specify Nonuniform y-Axis Tick Values
% Display tick marks along the _y_-axis at nonuniform values between 0 and
% 25. MATLAB(R) labels the tick marks with the numeric values. 

x = linspace(-5,5);
y = x.^2;
plot(x,y)
yticks([0 2 4 6 8 10 15 25])