John Hunter wrote:
>>>>>> "Christopher" == Christopher Barker <[EMAIL PROTECTED]> writes:
> 
>     Christopher> However, it is the case that there is a lot of stuff
>     Christopher> in pylab that makes it easier to use MPL in
>     Christopher> interactive mode. I kind of think that's a shame. I
>     Christopher> don't think that there is any reason that an OO
>     Christopher> interface is less suited to interactive mode.
> 
> It's currently implemented in pylab but could be moved up to the OO
> layer by doing something like
> 
> class Axes:
>    def plot(self, *args, **kwargs):
>        ...plot something
>        if rcParams['interactive']:
>             self.figure.canvas.draw()

I think this may be a slippery slope.  The problem is that for it to 
work well, there has to be a clear distinction between methods that are 
endpoints, requiring a redraw, and methods that will be used by other 
methods.  For example, errorbar makes multiple calls to plot, vline, 
etc.  Even in interactive mode, we don't want redraws after each of 
those calls, only after the errorbar call itself.  This could be handled 
by including an additional kwarg ("redraw=False"), or by requiring that 
methods like errorbar use only lower-level primitives, but either way, 
complexity increases.

Eric

> 
> or by providing some autowrapper facility to automate this.  Probably
> could be done elegantly with decorators, but we can't use decorators
> yet...
> 
> Or OO users can just call fig.canvas.draw() themselves when they want
> to draw....
> 
> JDH
> 


-------------------------------------------------------------------------
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-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to