[Scilab-users] Stacked 2D plot in 3D

Samuel Gougeon sgougeon at free.fr
Sat Feb 3 20:02:04 CET 2018


Le 03/02/2018 à 18:35, Claus Futtrup a écrit :
> .../...
> The above code draws lines in the Y-axis direction. What I intended to 
> do is to draw lines in the frequency-direction (x-axis direction). I 
> see how e.children(i) manipulates the curves, but have failed to find 
> a way to change this (= the direction of the lines). I looked also at 
> the examle that Samuel gave with the plot3d3, where he draws a globe 
> and can turn lines on/off in the two directions ... I also looked at 
> the latest proposal by Samuel to updated param3d(1) and the lines in 
> his last examples are drawn along the x-axis direction.

> What I intended to do is to draw lines in the frequency-direction 
> (x-axis direction).
Claus,

There are 2 distinct things:
a) the law you want to plot: Z(f)_theta or Z(theta)_f
b) the direction along which you want to plot the chosen law at the 
varying parameter

The only thing that you can't choose is that param3d1() plots each line 
from a particular triplet of X,Y,Z *columns*,
for all columns.
Then, you can do what you want.
Here is again the param3d1() example, but in an asymetric version (a 
long and a short sides):

[X,  Y]  =  ndgrid(-11:0.5:9,  -5:0.5:6);  // x is the long side, y the short one

clf
subplot(1,2,1)
R  =  sqrt(X.*X  +  Y.*Y)  +  %eps;
Z  =  sin(R)./R;
param3d1(X,  Y,  Z,  150,  85,  flag=[2,4])

subplot(1,2,2)
R  =  sqrt(X'.*X'  +  Y'.*Y')  +  %eps;
Z  =  sin(R)./R;
param3d1(X',  Y',  Z,  150,  85,  flag=[2,4])



Since this looks not trivial, i will change the example in the page to 
better illustrate both cases.

Cheers
Samuel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20180203/3ffb9238/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ljacfihbihjmgjfn.png
Type: image/png
Size: 14485 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20180203/3ffb9238/attachment.png>


More information about the users mailing list