Dear list, I recently came across the following code:
In [7]: size = 50*np.random.randn(100) In [8]: colours = np.random.rand(100) In [9]: scatter(x, y, s=size, c=colours); In [10]: show() which works beautifully. My question though is this: why? I came to understand, with Google's help, that the randomly generated values (ranging between 0.0 and 1.0) for the variable colours are mapped to a color table, so that the generated value of, say, 0.21985792 is linked to a given color. This color is then used to paint one scatter point. I was unable to find helpful (i.e. newbie friendly) information on how this color mapping exactly works. Where is the table? The matplotlib documentation caused me confusion. Thanks for your kind help, David ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users