%% Revert Back to Default Plot Box Aspect Ratio
% Create a 3-D scatter chart of random data and set the plot box aspect ratio. Then revert back to the default plot box aspect ratio.

X = rand(100,1);
Y = rand(100,1);
Z = rand(100,1);
scatter3(X,Y,Z)
pbaspect([3 2 1])

%

pbaspect auto

% Copyright 2012 The MathWorks, Inc.