From: John H. <jd...@gm...> - 2009-04-29 03:07:21
|
On Tue, Apr 28, 2009 at 10:01 PM, Thomas Robitaille < tho...@gm...> wrote: > Hi John, > > Thanks for your help! > > I'm not sure how I should go about overriding the existing method. Say I > have the following custom savefig(): > > def savefig(self, evt): > print "Hello world" > > and a figure() instance fig, how do I actually tell > fig.canvas.manager.frame.toolbar.save to actually point to my custom > savefig? w/o having anything to test handy, the first thing to try is:: fig.canvas.manager.frame.toolbar.save = mysavefg where mysavefig is the function you define. JDH |