From: Benjamin R. <ben...@ou...> - 2014-12-05 21:29:25
|
I would look at line 24/25. You are constructing a MyStaticMplCanvas instance on 24, with a self.main_widget as the parent. But then on 25, you explicitly call the constructor again (which is not a good idea), but with the main window as the parent (the self argument). I bet that is throwing off a couple things. The code is extremely hard to follow, and I think it is a bad example to build off of in the first place (unnescessary subclassing). Perhaps a different example would be more suitable? What programming language are you coming from? Ben Root On Fri, Dec 5, 2014 at 4:12 PM, Matthew Albert <mat...@ya...> wrote: > I'm sure this is a simple problem, but I've been going around in circles > several days trying to figure this out. > > Here's my code. > http://pastebin.com/n83dGhG4 > > Basically, I'm trying to get my pyqt4 button signal to execute the plot > command (line 122). A lot of this code was copied from the matplotlib > example page. If I uncomment line 148, the figure will successfully plot. > I don't understand why what I'm doing on line 122 isn't equivalent to line > 148. > > thx for your help. > Matt > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-devel mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel > > |