Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to plot orthogonal coordinate axes arrows

1,372 views
Skip to first unread message

Yannos M

unread,
Nov 2, 2011, 2:16:28 PM11/2/11
to
Hello,

Does anybody know if there is a function for plotting the orthogonal coordinate axes arrows (the origin-reference arrows) in a Matlab 3D figure?


thanks,
Yannos

Yannos M

unread,
Nov 3, 2011, 10:29:27 AM11/3/11
to
this should be easy...anybody??


"Yannos M" wrote in message <j8s1ds$njs$1...@newscl01ah.mathworks.com>...

John Barber

unread,
Nov 3, 2011, 10:52:27 AM11/3/11
to
"Yannos M" wrote in message <j8s1ds$njs$1...@newscl01ah.mathworks.com>...
Yannos,

For central axis lines through an origin, you can use my File Exchange submission, oaxes, available here: http://www.mathworks.com/matlabcentral/fileexchange/30018

If you just want a small indicator for orientation, try Tiny Axis, available here: http://www.mathworks.com/matlabcentral/fileexchange/32168 (I haven't tested this one, but it looks interesting).

-John

Yannos M

unread,
Nov 3, 2011, 1:32:28 PM11/3/11
to
"John Barber" <johnp...@REMOVEyahooTHIS.com> wrote in message <j8u9rb$6ai$1...@newscl01ah.mathworks.com>...
John,

Thanks a lot! really helpful. The second link looks more interesting and it's closer to what I want but it's not very well documented and it doesn't make sense to me...
especially the h input argument in the function

tinyaxis(h,'r','g','b');

I don't really get what is it..

Anyway, thanks a lot!

Yannos

shiva

unread,
Nov 24, 2012, 2:05:08 AM11/24/12
to
Try this

plot3([0 100],[0 0],[0 0],'r',[0 0],[0 100],[0 0],'g',[0 0],[0 0],[0 100],'b','linewidth',2);



"Yannos M" wrote in message <j8s1ds$njs$1...@newscl01ah.mathworks.com>...

shiva

unread,
Nov 24, 2012, 3:31:08 AM11/24/12
to
you can also do this,

x = line([0 100],[0,0],[0,0],'color','r');
y = line([0 0],[0,100],[0,0],'color','g');
z = line([0 0],[0,0],[0,100],'color','b']);

shiva

unread,
Nov 24, 2012, 3:40:07 AM11/24/12
to
Edited: "error in z"


x = line([0 100],[0,0],[0,0],'color','r');
y = line([0 0],[0,100],[0,0],'color','g');
z = line([0 0],[0,0],[0,100],'color','b');

you may also add,

linewidth

Example:

x = line([0 100],[0,0],[0,0],'color','r','linewidth',2);
0 new messages