Skip to content

Commit

Permalink
use StrongFocus as the default policy and restore imshow from orig ex…
Browse files Browse the repository at this point in the history
…ample
  • Loading branch information
jdh2358 committed Feb 26, 2012
1 parent 5246c04 commit b3e43e6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/user_interfaces/embedding_in_qt4_wtoolbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def create_main_frame(self):
self.fig = Figure((5.0, 4.0), dpi=100)
self.canvas = FigureCanvas(self.fig)
self.canvas.setParent(self.main_frame)
self.canvas.setFocusPolicy( Qt.ClickFocus )
self.canvas.setFocusPolicy( Qt.StrongFocus )
self.canvas.setFocus()

self.mpl_toolbar = NavigationToolbar(self.canvas, self.main_frame)
Expand All @@ -43,8 +43,8 @@ def on_draw(self):
self.fig.clear()
self.axes = self.fig.add_subplot(111)
#self.axes.plot(self.x, self.y, 'ro')
#self.axes.imshow(self.data, interpolation='nearest')
self.axes.plot([1,2,3])
self.axes.imshow(self.data, interpolation='nearest')
#self.axes.plot([1,2,3])
self.canvas.draw()

def on_key_press(self, event):
Expand Down

0 comments on commit b3e43e6

Please sign in to comment.