Hello List, Hello Michael, Hello Jae-Joon, Michale wrote: > It looks like overriding "draw_unsampled_image" is the wrong thing to do > here, though.
JJ wrote: > Overriding this behavior (which I guess is the case of you current ShearImage > implementation. Please correct me if I'm wrong) won't be acceptable. I was (and am) aware of this problem, this is what I meant when I wrote "I should have overridden make_image". That's exactly the point: there are two ways to make the image: one using Agg and fancy interpolations, the other one to use the backend and have the interpolation "none". The former is done by make_image, the latter by _draw_unsampled_image. It would have been correct for me to override make_image, unfortunately this was not possible since make_image only makes the image, it is then drawn by _AxesImageBase.draw, which unfortunately is not flexible enough, as it does not allow for the image to be drawn elsewhere than the origin of the axes, which is not necessarily what I want. This is why I abused _draw_unsampled_image. I am aware that this is an abuse, but my code was only inteded as demonstration code. I don't know where to go from here. We could: - make make_image actually draw the image. This would be a break in the API. - introduce a new method (_draw_sampled_image seems like a good name) that does that. That indirectly changes the API since make_image won't be called anymore, overriding it doesn't make a difference anymore. - Rewrite matplotlib from scratch in Java (just kidding) I'm looking forward to your ideas. Greetings Martin -- Fachbereich Physik Freie Universität Berlin Arnimallee 14 14195 Berlin +49 30 6392 1234 ------------------------------------------------------------------------------ AppSumo Presents a FREE Video for the SourceForge Community by Eric Ries, the creator of the Lean Startup Methodology on "Lean Startup Secrets Revealed." This video shows you how to validate your ideas, optimize your ideas and identify your business strategy. http://p.sf.net/sfu/appsumosfdev2dev _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel