According to the documentation page for the "axis" function:
V = AXIS returns a row vector containing the scaling for the
current plot. If the current view is 2-D, V has four components; if it is 3-D, V has six components.
However, "axis" does not always return what is expected. For example:
1. When plotting a line in 3-D and setting the view to (0,0), instead of returning a 4-element vector containing the limits of the x- and z-axis, it returns the x- and y-limits.
2. When using "view(eps,0)", the plot is indeed 3-D and the returned vector contains 6 elements as expected.
3. When using "view(eps,90)", the function does not append the z-limits despite this view being technically 3-D.
The "axis" function should return the limits of the actual view.
This odd behavior is illustrated by the following plot (generated by the attached script):
Best Answer