www.gusucode.com > graphics 案例源码程序 matlab代码 > graphics/SpecifyAxisLimitsExample.m
%% Specify Axis Limits % Set the _x_-axis and _y_-axis limits to match the range of data. % Copyright 2015 The MathWorks, Inc. [x,y] = meshgrid(-1.75:.2:3.25); z = x.*exp(-x.^2-y.^2); figure surf(x,y,z) xlim([-1.75,3.25]) ylim([-1.75,3.25])