From: Yusof Ghafur on
I'm using plot3(x, y, z) to draw something.

But as shown in the picture below, my axes are messed up.
http://i21.photobucket.com/albums/b272/yusof_hardy/3dplot.png


How do I align the origin (0,0,0) ?
I also want the 3 axes to follow left-hand rule. (If your index finger points the positive direction of the x axis and middle finger points the positive direction of the y axis, then your thumb points the positive direction of the z axis).



Thanks in advance
From: Yusof Ghafur on
Correction:

(If your index finger points the positive direction of the y axis and middle finger points the positive direction of the z axis, then your thumb points the positive direction of the z axis)
From: Roger Stafford on
"Yusof Ghafur" <yusof_hardy(a)hotmail.com> wrote in message <hpq07u$9in$1(a)fred.mathworks.com>...
> I'm using plot3(x, y, z) to draw something.
>
> But as shown in the picture below, my axes are messed up.
> http://i21.photobucket.com/albums/b272/yusof_hardy/3dplot.png
>
> How do I align the origin (0,0,0) ?
> I also want the 3 axes to follow left-hand rule. (If your index finger points the positive direction of the x axis and middle finger points the positive direction of the y axis, then your thumb points the positive direction of the z axis).
> .......
-----------------
In your image the two respective axis systems are actually in the same right-hand orientation. In either one if you point your right hand thumb along the z-axis, your fingers will curl from the x-axis toward the y-axis. The two sets of axes differ in that the one is turned around about a vertical axis roughly 180 degrees relative to the other. That brings the plot3 origin out to the lower front whereas your origin is in the rear. Otherwise they are alike. Actually the z-axis is not explicitly shown in the plot3 diagram but you can imagine that it would point straight upward from the (0,0,0) origin out at the lower front.

You should know that matlab has a function called 'view' which will allow you to change the orientation in a plot3 diagram. The one you show is just the default setting. You can change the "azimuth" and "elevation" to any values you desire. I recommend you take some time out to experiment with different settings so as to better visualize what is being displayed. It will allow you to simulate walking around a 3D display to get a better feeling of the depth of things being plotted. A careful perusal of your matlab manual in this area is of course a must.

Roger Stafford