From: John H. <jdh...@ac...> - 2004-03-26 03:28:02
|
>>>>> "paulo" == paulo <phe...@eo...> writes: paulo> I am using the scatter plot of Matplotlib to plot the paulo> position of each particle. That works great, but when I try paulo> to assign different colors to each dot according to their paulo> concentration I find some problems. Although there is a big paulo> range of concentrations (colors) I can only see two in the paulo> plot. Is it possible to define more intervals to assign the paulo> colors? I think I did not understand the right way to paulo> define the c array intensities when I use the command: paulo> scatter(self, x, y, s=None, c) How should I generate that paulo> array? I looked at the example but I couldn't figure it paulo> out. Hi Paulo, It would help to see some code to let you know why your current approach isn't working. For now, all I can say is that c should be a len(x) Numeric array of concentrations. It might help for you to do hist(c, 100) to look at the distribution of concentrations. If the distribution is bimodal and strongly peaked, this may explain why you only see two colors. As for your question about defining more colors, the default is to use a colormap of 1000 colors, which should be an ample number to see a range unless something funny is going on with your c array. When you post some code, also post the first few entries of c, eg c[:10]. JDH |