%% Use Semiautomatic y-Axis Limits
% Create a surface plot and show only y values greater than 0. Specify the minimum y-axis limit as 0 and let MATLAB choose the maximum limit.

[X,Y,Z] = peaks;
surf(X,Y,Z)
ylim([0 inf])

% Copyright 2012 The MathWorks, Inc.