function nice3d
% make 3d plots nicer by 
%   making axis units equal
%   using perspective 
%   showing bounding box
%   showing grid
%   allow rotation by mouse dragging
%
% use nice3dn if you don't want to make axis units equal

xlabel('x'); ylabel('y'); zlabel('z')
camproj('perspective')    % undo by   camproj('orthographic')
box on                    % undo by   box off
axis tight                %
axis equal                % undo by   axis normal 
grid on                   % undo by   grid off

axis vis3d

%rotate3d on
cameratoolbar('SetMode','orbit');


