MATLAB: What ‘s different between axis square and axis equal in matlab

MATLABplot surf plot3d

when I plot or surf, what's different between axis square and axis equal ?

Best Answer

From this page:
axis equal sets the aspect ratio so that the data units are the same in every direction. The aspect ratio of the x-, y-, and z-axis is adjusted automatically according to the range of data units in the x, y, and z directions.
axis square makes the current axes region square (or cubed when three-dimensional). This option adjusts the x-axis, y-axis, and z-axis so that they have equal lengths and adjusts the increments between data units accordingly.