[scilab-Users] Re: Question with multiple 3d plot colors

Patufet P patufet99 at gmail.com
Thu Oct 23 09:07:46 CEST 2008


Your suggestion works well. In the "colorbar" help there is an example
where you can map the z space to the color scale: dsearch(zz,
linspace(zmin, zmax, nb_col+1));
My example works with:

f=scf();
nb_col = 64;
f.color_map=jetcolormap(nb_col)
zmax=6;
zmin=-1;
colorbar(zmin,zmax,fmt="%.1f")
t=[0:0.3:2*%pi]';
z=sin(t)*cos(t');
[xx,yy,zz]=genfac3d(t,t,z);
zcol=dsearch(zz, linspace(zmin, zmax, nb_col+1));
plot3d(xx,yy,list(zz,zcol))

[xx,yy,zz]=genfac3d(t,t,z+5);
zcol=dsearch(zz, linspace(zmin, zmax, nb_col+1));
plot3d(xx,yy,list(zz,zcol))

Thank you for your help.

Regards

On Wed, Oct 22, 2008 at 12:56 PM, Enrico Segre
<enrico.segre at weizmann.ac.il> wrote:
> AFAIU that should be possible only if you first transform your surfaces
> to  facelet representation (see help genfac3d) and then either you call
> plot3d(xf,yf,zf) lumping all the facelets together, or
> plot3d(xf,yf,list(zf,colors)) for each one of them, specifying at hand
> the colors of each piece as function of z
> (i.e. colors=1+(zf-zmin)*(ncolors-1)/(zmax-zmin) ).
>
> hth, Enrico
>
>
>



More information about the users mailing list