[Scilab-users] Collecting zero points of x, y, z-axes to one point

Samuel Gougeon sgougeon at free.fr
Thu Jul 16 14:42:24 CEST 2015


Le 16/07/2015 04:53, jaipur a écrit :
> I'm creating a picture of a vector to demonstrate vector rotation for study.
>
> I have made the picture below by the following code.
> I'd like to make 3D picture in which zero points of x, y, z-axes are always
> fixed to one point indicated as red circle (the origin of axes), while
> rotating a picture by mouse's right button down and moving.
> How shall I do it?
>
> xarrows([0 1],[0 1],[0 1]);
> h1=gca();
> h1.axes_visible='on';
> h1.grid=[1 1 1];
> h1.box='on';
> h1.x_location='origin';
> h1.y_location='origin';
> xlabel('X'); ylabel('Y'); zlabel('Z');
>
> There is not 'z_location' in axes properties. Is that influence this
> problem?
.
Yes,  there are actually 2 issues here:
1) indeed, a .z_location is missing. Here (Z) goes through (1,1,.) and 
there is no way to force it passing through (0,0,.)
2) .x_location='origin' forces (X) to pass through (.,0,.) instead of 
(., 0, 0), i.e.: it should pass through z=0, not only through y=0.
     Same thing for .y_location="origin", that should pass through 
(0,.,0) instead of (0,.,.)

This bug and missing features are not yet reported in Bugzilla.
However, Adrien made a nice proposal http://bugzilla.scilab.org/13433 in 
order to generalize the "origin" possibility:
/"i wish the option y_location = "origin" is replaced for one that gives 
the opportunity to place the y_axes at an arbitrate coordinate on the x 
(and z) axis//"/

I would definitively vote for this replacement.

Unfortunately, neither centering data_bounds, nor wondering about 
drawaxis() (not supporting 3D), nor using "axis origin" from the pltlib 
ATOMS, are able to answer to your need  that is -- yet -- a quite simple 
situation...

Regards

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20150716/4b7afb04/attachment.htm>


More information about the users mailing list