Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d4ad005

Browse files
committed
minor changes for gtk navigation
svn path=/branches/transforms/; revision=3843
1 parent d08ea86 commit d4ad005

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

lib/matplotlib/backends/backend_gtk.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,8 @@ def __init__(self, canvas, num):
405405
self.toolbar = self._get_toolbar(canvas)
406406

407407
# calculate size for window
408-
w = int (self.canvas.figure.bbox.width())
409-
h = int (self.canvas.figure.bbox.height())
408+
w = int (self.canvas.figure.bbox.width)
409+
h = int (self.canvas.figure.bbox.height)
410410

411411
if self.toolbar is not None:
412412
self.toolbar.show()
@@ -518,7 +518,7 @@ def draw_rubberband(self, event, x0, y0, x1, y1):
518518

519519
gc = drawable.new_gc()
520520

521-
height = self.canvas.figure.bbox.height()
521+
height = self.canvas.figure.bbox.height
522522
y1 = height - y1
523523
y0 = height - y0
524524

@@ -639,8 +639,8 @@ def configure_subplots(self, button):
639639
toolfig.subplots_adjust(top=0.9)
640640
tool = SubplotTool(self.canvas.figure, toolfig)
641641

642-
w = int (toolfig.bbox.width())
643-
h = int (toolfig.bbox.height())
642+
w = int (toolfig.bbox.width)
643+
h = int (toolfig.bbox.height)
644644

645645

646646
window = gtk.Window()

lib/matplotlib/backends/backend_gtkagg.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,9 @@ def configure_event(self, widget, event=None):
6060
w,h = widget.window.get_size()
6161
if w==1 or h==1: return # empty fig
6262

63+
# dpival = self.figure.dpi.get() MGDTODO
6364
# compute desired figure size in inches
64-
dpival = self.figure.dpi.get()
65+
dpival = self.figure.dpi
6566
winch = w/dpival
6667
hinch = h/dpival
6768
self.figure.set_size_inches(winch, hinch)

0 commit comments

Comments
 (0)