'How to let the axis not change its size when I spinning?

When I spin the figure , the axis will change its length , how to keep the figure the same length ? (the tick range doesn't change, but the visual length of the axis changes) origin figure spin figure

for i=1:360

a=ones(50);
a=mesh(a),axis equal,view(30+i,30),axis image;

pause(0.01)
end


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source