Ah, the list config got me ... (resending to list)

2010/8/10 Benjamin Root <ben.r...@ou.edu>:
> I am working on a function that can take a Colormap object and return a
> grayscale form of it.  Ideally, I would like to return the same type of
> Colormap that was provided, but I am wondering if this is necessary.  I
> supposed it is sufficient to just create a LinearSegmentedColormap from the
> self._lut data?
>
> The problem I see with that approach is that there is still possibly some
> information loss, particularly with the alpha part of the rgba data.
> LinearSegmentedColormap has a .from_list() function, but it uses only the
> rgb part of the rgba array and does not take alpha data.
>
> Is the inability of setting alpha a problem?  Or maybe I should use
> deepcopy() instead?

If you mean me, I really don't know, but I think it is always better
to do things
properly than to publish something done with the attitute "just
working" ....

So I think it is probably best to code it into the Colormap object
itself, so that each and ever derived class can define its own method
of how to create a greyscale version.  What do you think about that?

Friedrich

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to