DevelopmentInstallUbuntu: scroll_wx_mpl.patch
| File scroll_wx_mpl.patch, 1.2 kB (added by jonathan.taylor, 8 months ago) |
|---|
-
lib/matplotlib/backends/backend_wx.py
old new 1174 1174 FigureCanvasBase.button_release_event(self, x, y, 1, guiEvent=evt) 1175 1175 1176 1176 def _onMouseWheel(self, evt): 1177 # TODO: implement mouse wheel handler 1178 pass 1177 """Handle mousewheel events.""" 1178 x = evt.GetX() 1179 y = self.figure.bbox.height() - evt.GetY() 1180 if evt.GetWheelRotation() > 0: 1181 direction = 'up' 1182 else: 1183 direction = 'down' 1184 evt.Skip() 1185 FigureCanvasBase.scroll_event(self, x, y, direction, guiEvent=evt) 1179 1186 1180 1187 def _onMotion(self, evt): 1181 1188 """Start measuring on an axis.""" … … 1393 1400 self.canvas.figure.add_axobserver(notify_axes_change) 1394 1401 1395 1402 def showfig(*args): 1396 figwin.frame.Show()1397 figwin.canvas.realize()1398 figwin.canvas.draw()1403 self.frame.Show() 1404 self.canvas.realize() 1405 self.canvas.draw() 1399 1406 1400 1407 # attach a show method to the figure 1401 1408 self.canvas.figure.show = showfig
