From: Benjamin R. <ben...@ou...> - 2010-09-15 16:32:29
|
On Wed, Sep 15, 2010 at 10:44 AM, John Hunter <jd...@gm...> wrote: > On Mon, Sep 13, 2010 at 4:27 PM, Benjamin Root <ben...@ou...> wrote: > > > Just reping-ing this. I haven't heard anything negative and got a few > > positive comments off-list. I haven't committed this yet because I am > > concerned about the implications of my changes to cm.py, colors.py and > > contour.py. However, if I don't hear any concerns over the next couple > of > > days, shall I assume that it is ok to go ahead and commit? > > I haven't looked closely at this yet, but at a glance it feels like a > heavy-weight solution to what should be a simple problem. Can we not > just have a "to_grayscale method of the colormap? Also, I second > Friedrich's concern/question about the ThinWrap approach -- what is > the argument for wrapping vs deriving? > > JDH > 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? Maybe that idea is better? Ben Root |