Skip to content

Commit b3e43e6

Browse files
committed
use StrongFocus as the default policy and restore imshow from orig example
1 parent 5246c04 commit b3e43e6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/user_interfaces/embedding_in_qt4_wtoolbar.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def create_main_frame(self):
2323
self.fig = Figure((5.0, 4.0), dpi=100)
2424
self.canvas = FigureCanvas(self.fig)
2525
self.canvas.setParent(self.main_frame)
26-
self.canvas.setFocusPolicy( Qt.ClickFocus )
26+
self.canvas.setFocusPolicy( Qt.StrongFocus )
2727
self.canvas.setFocus()
2828

2929
self.mpl_toolbar = NavigationToolbar(self.canvas, self.main_frame)
@@ -43,8 +43,8 @@ def on_draw(self):
4343
self.fig.clear()
4444
self.axes = self.fig.add_subplot(111)
4545
#self.axes.plot(self.x, self.y, 'ro')
46-
#self.axes.imshow(self.data, interpolation='nearest')
47-
self.axes.plot([1,2,3])
46+
self.axes.imshow(self.data, interpolation='nearest')
47+
#self.axes.plot([1,2,3])
4848
self.canvas.draw()
4949

5050
def on_key_press(self, event):

0 commit comments

Comments
 (0)