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

    %% Specify z-Axis Tick Values and Labels
% Create a surface plot. Display tick marks along the _z_-axis at the
% values -8, 0, and 8. Then, specify a label for each tick mark.

[x,y,z] = peaks;
surf(x,y,z)
zticks([-8 0 8])
zticklabels({'z = -8','z = 0','z = 8'})