MATLAB: Help with plot axis

axises problem

I have a piece of code that goes through a loop 1000 times determining the values of x and y. I then plot these coordinates.
I want the x and y axis to be the same so I tried axis equal however I obtained a graph with the axises as so. Can anyone explain why the x and y axis aren't equal? The x axis ranges from -300 to 300 and the y axis from 0 to 450.

Best Answer

The axis equal call uses the same length for the data units along each axis. It does not affect the range of values. If you want to change those, use the axis call as:
axis([xmin xmax ymin ymax])
You can also combine that call with an axis equal call, so one does not cancel or override the other.
Related Question