|
From: John H. <jd...@gm...> - 2009-11-17 23:33:49
|
On Tue, Nov 17, 2009 at 4:04 PM, Christopher Barker <Chr...@no...> wrote: > Peter McGregor wrote: >> The problem with those examples is, when I comment the following line (for example in http://matplotlib.sourceforge.net/examples/user_interfaces/embedding_in_wx2.html): >> >> self.add_toolbar() # comment this out for no toolbar >> >> then I have no possibility to make the window react to mouse events. > > Give wxMPL a try: > > http://agni.phys.iit.edu/~kmcivor/wxmpl/ > > It handles some, if not all, of this for you. > > However, you bring up a good point, unless you have missed something -- > the code for the various interactive modes really should be separate > from the toolbar that activates those modes. Well, they are -- they all reside in the baseclass which the GUI toolbars override. Peter can subclass backend_bases.NavigationToolbar2 and make a custom toolbar. If a "is a" relation doesn't work for him, with a little work he should be able to do a "has a" with the baseclass. JDH |