[scilab-Users] plot dots in 3d and 2d using color

Ding Zheng Ding.Zheng at reson.com
Wed Feb 23 16:16:05 CET 2011


Hi Samuel,

Thanks for your reply. Actually I had looked this thread. But I want to draw every point in different color if their z value is different.
I am not very clear about the list(z,colors) in param3d1 function. My understanding, the colors should be a vector values mapped from z value. Isn't? but it doesn't work.

And I also looked the thread written by Enrico Segre.


clf(); xset("colormap",hotcolormap(nc))
drawlater()
plot2d(x,y,-2)
for i=1:N
  plot2d(x(i),y(i),-9)
  e=gce();e=e.children;
  e.mark_size_unit="point"; e.mark_size=6;
  e.mark_foreground=-1;  e.mark_background=zc(i);
end
drawnow()

the function works for plot2d. but my data is huge. It has 290000 points. It will be very slow using this function due to the loop for every points.

For plot 3d points. Still I haven't solution.

Regards

Ding zheng


From: Samuel GOUGEON [mailto:Samuel.Gougeon at univ-lemans.fr]
Sent: woensdag 23 februari 2011 14:08
To: users at lists.scilab.org
Subject: Re: [scilab-Users] plot dots in 3d and 2d using color

Hello,

----- Message d'origine -----
De : Ding Zheng
Date : 23/02/2011 11:17:
Hi
I am trying plot dots 3d in Scilab. the data someting like x(1,n),y(1,n),z(1,
n). I tried both plot3d(x,y,list(z,colors)) and param3d1(x,y,list(z,colors)).
I made the colors las below:

nc=256;
colors =1+(nc-1)*(z-min(z))/(max(z)-min(z));

the dots can be plotted. but the dots's color is always black. if use a
colormap. xset("colormap",hotcolormap(256)). it also doesn't work.

Can everyone help me?
You may have a look here:
http://bugzilla.scilab.org/show_bug.cgi?id=6344#c1
attachement: http://bugzilla.scilab.org/attachment.cgi?id=1465
plotPoints() plots a set a points with the desired color,
the same color for all points.

Regards
Samuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20110223/677275ec/attachment.htm>


More information about the users mailing list