On Wed, Sep 15, 2010 at 11:31 AM, Benjamin Root <ben.r...@ou.edu> wrote:
> But, what would the "to_grayscale" method produce? And what about other > possible transformations? Should we add other functions as well to invert, > brighten, darken, etc? > > Maybe another approach would be to have the Colormap class have an attribute > function called "transform" that would, by default, be just a function that > returns the input rgba array. Then, one could assign different > transformation functions that would be used in the __call__ function of the > colormap? to_grayscale would return a colormap instance. If the colormap also had a "darken" or "invert" (if people think this is useful), they could also be colormap methods. Then you could chain imshow(..., cmap=cm.jet.to_grayscale().darken()) KDJ ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel