[scilab-Users] Plotting three dimensional vectors

Stephane Mottelet stephane.mottelet at utc.fr
Sun Jun 7 17:22:51 CEST 2009


Hi,

This can be done, but not directly. You have to plot the (x,y)  
component first using xarrows, get the handle of the segs entity then  
add a third column to the
data field :

xarrows(nx,ny)
h=gce();
h.data=[h.data nz(:)];

nx, ny, nz are 2 x n matrices containing the origin of vectors on the
first line and the extremity on the second line.

S.



Jerry Nelson <jnelson at satcharters.com> a écrit :

> Good afternoon,
>
> I am trying to visualize two simple vectors in three dimensions, and  
> not having much luck. So I thought I would try to create a picture  
> to help. I'm not having much luck there either.
>
> I would like to create a plot of the two vectors x=(2, 4, 9) and  
> y=(1, 3, 5), and to display them both on the same graphic with the  
> axis' displayed as well. I have searched through the manual, the  
> help system, and the demos to no avail. There is a lot of  
> information there, but with no starting point, I am just getting  
> further confused.
>
> If I'm not asking too much, it would be nice to display each vector  
> in a different color, and to define the axis dimensions (in other  
> words set the x-axis to -5 to 10, the y-axis to 0 to 10, and the  
> z-axis to -10 to 10)
>
> Thanks for any help,
> Jerry
>



More information about the users mailing list