Matthieu Brucher wrote:
>     I don't quite understand: what kind of "c" are you passing in, what is
>     the original code doing with it, and what should it do with it?  (I find
>     both the original and the suggested code hard to understand, which makes
>     me think that neither is actually what we want.)
> 
> 
> 
> c is a named argument of the scatter method for the colors, but it is 
> modified to get the real "colors" argument.
>  
> 
>     I think that what we want may be the following:
> 
>     try:
>          colors = colorConverter.to_rgba_list(c, alpha)
>     except TypeError:
>          colors = None  # generate colors later by applying a colormap to c
> 
>     Part of what makes all this hard to understand is that in the None
>     case,
>     colors are generated from c far down in the code, out of sight of this
>     initial processing.  Hence the comment.

Now I don't think that the above is what we really want; see below.

> 
>     OK, now I see that what I proposed won't work until I rip out the
>     long-deprecated float-as-grey option.  Looks like a good time for me to
>     do it.

This is done (with corresponding simplification of the code and improved 
error checking and reporting), and I have made slight changes to 
scatter, but there is still an ambiguity in scatter's argument handling. 
  It was and is resolved in favor of treating the c argument as an array 
rather than an rgb or rgba sequence in any case where it could be 
either.  (To be safe, if you want c to be an mpl color, use a string 
form of colorspec as specified in the scatter docstring.) I don't know 
whether this ambiguity, or possibly a bug in its resolution, was what 
prompted your original message.  In any case, please try the svn version 
and see if it does what you want.  If it does not, then please say 
exactly what c you are passing in to scatter, what scatter is doing, and 
what you think it should do instead.  I never understood that from your 
previous messages.

Eric

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to