%% Query Data Aspect Ratio
% Create a surface plot and query the data aspect ratio.

[x,y] = meshgrid(-2:.2:2);
z = x.*exp(-x.^2 - y.^2);
surf(x,y,z)

%

d = daspect

% The ratio indicates that the length of four units in the x-axis direction equals four units in the y-axis direction and one unit in the z-axis direction. For example, if the ratio is [4 4 1], then the length from 0 to 1 on the x-axis equals the length from 0 to 1 on the y-axis and 0 to 0.25 on the z-axis.
% Copyright 2015 The MathWorks, Inc.