add colors to scatter plots

I am using the scatter plot of Matplotlib to plot the

    > position of each particle. That works great, but when I try
    > to assign different colors to each dot according to their
    > concentration I find some problems. Although there is a big
    > range of concentrations (colors) I can only see two in the
    > plot. Is it possible to define more intervals to assign the
    > colors? I think I did not understand the right way to
    > define the c array intensities when I use the command:
    > scatter(self, x, y, s=None, c) How should I generate that
    > array? I looked at the example but I couldn't figure it
    > 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