[scilab-Users] A red point in plot3d

Samuel GOUGEON Samuel.Gougeon at univ-lemans.fr
Mon May 18 14:51:13 CEST 2009


----- Message d'origine -----
De : Lucio Agostinho Rocha
Date : 17/05/2009 20:26:
> .../...
> Then, I tried to insert a new position in each list, like this:
>
>    tx=length(x)+1;
>    ty=length(y)+1;
>    x(1,tx)=2;
>    y(1,ty)=1;
>    g(tx,ty)= x(tx) .* sin((4*%pi) * x(tx)) - y(ty) .* sin ( (4*%pi) *  
> y(ty) + %pi ) + 1;
>
>    plot3d(x,y,g)
>
> But this don't work. I've several values for x and y like '0.8987...' 
> and '-0.321...'. How can I plot this points in my function? Some 
> suggestion?
>
> Thanks in advance,
>
> Lucio
> ........
>
Here is a trick that may work for this purpose:
After plot3d(), do a plot2d(Xp,Yp) where Xp and Yp are the 2 first 
coordinates of your
(Xp,Yp,Zp) set of points (Xp, Yp, Zp are vectors of same lengths N for N 
points to be marked)

Then, do:
ca=gca();
cc=ca.children(1).children(1);
cc.data(:,3)=Zp;  // Be carefull: Zp must be a column-vector
cc.line_mode='off';
cc.mark_mode='on';
cc.mark_style=8; // for diamonds. Run getmark() or see help 
polyline_properties for other marks
cc.mark_foreground=color('red');

This should yield what you are expecting

Regards
Samuel

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


More information about the users mailing list