Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
How to plot orthogonal coordinate axes arrows

Subject: How to plot orthogonal coordinate axes arrows

From: Yannos M

Date: 2 Nov, 2011 18:16:28

Message: 1 of 7

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

Subject: How to plot orthogonal coordinate axes arrows

From: Yannos M

Date: 3 Nov, 2011 14:29:27

Message: 2 of 7

this should be easy...anybody??


"Yannos M" wrote in message <j8s1ds$njs$1@newscl01ah.mathworks.com>...
> 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

Subject: How to plot orthogonal coordinate axes arrows

From: John Barber

Date: 3 Nov, 2011 14:52:27

Message: 3 of 7

"Yannos M" wrote in message <j8s1ds$njs$1@newscl01ah.mathworks.com>...
> 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,

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

Subject: How to plot orthogonal coordinate axes arrows

From: Yannos M

Date: 3 Nov, 2011 17:32:28

Message: 4 of 7

"John Barber" <johnpbarber@REMOVEyahooTHIS.com> wrote in message <j8u9rb$6ai$1@newscl01ah.mathworks.com>...
> "Yannos M" wrote in message <j8s1ds$njs$1@newscl01ah.mathworks.com>...
> > 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,
>
> 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


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

Subject: How to plot orthogonal coordinate axes arrows

From: shiva

Date: 24 Nov, 2012 07:05:08

Message: 5 of 7

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>...
> 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

Subject: How to plot orthogonal coordinate axes arrows

From: shiva

Date: 24 Nov, 2012 08:31:08

Message: 6 of 7

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']);

Subject: How to plot orthogonal coordinate axes arrows

From: shiva

Date: 24 Nov, 2012 08:40:07

Message: 7 of 7

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);

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us