[Scilab-users] Needs help with surface plot & colormap
Dang, Christophe
Christophe.Dang at sidel.com
Tue Jul 2 18:45:56 CEST 2013
Hello,
-----Message d'origine-----
De la part de surender_kumar
Envoyé : mardi 2 juillet 2013 18:23
> [...]
> subplot(121)
> x=linspace(0,%pi,100);
> plot(sin(x));
OK.
Can I suggest you to merge the data?
For a 2d drawing, it is quite easy.
Considering row vectors:
// **********
x = [x1, x2];
y = [y1, y2];
plot(x, y)
// **********
It is more difficult for 3d drawing, depending on the structure of the
data.
If x1, y1 and z1 are m1*n1 matrices,
x2, y2, z2 are m2*n2 matrices
then if n2 = n1, you can just do
x = [x1 x2] ; y = [y1 y2] ; z = [z1 ; z2]
if n1 and n2 are different, you might have to complete the smallest
matrices with %nan.
e.g.
// **********
x1 = [1 2 3 ; 1 2 3] ; y1 = [1 1 1 ; 2 2 2]
z1 = rand(x1);
x2 = [4 5 6 ; 7 8 9] ; y2 = y1 ;
z2=rand(x2) ;
x = [x1 x2] ; y = [y1 y2] ; z = [z1 z2] ;
plot3d2(x, y, z)
// **********
Hope this helps
--
Christophe Dang Ngoc Chan
Mechanical calculation engineer
______________________________________________________________________
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
______________________________________________________________________
More information about the users
mailing list