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

Skip to content

Commit 47d90a5

Browse files
committed
reverted print fig in tkagg since problem is in tk asksave dialog
svn path=/trunk/matplotlib/; revision=2553
1 parent ee977da commit 47d90a5

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/matplotlib/backends/backend_tkagg.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,10 @@ def get_tk_widget(self):
181181
def print_figure(self, filename, dpi=150, facecolor='w', edgecolor='w',
182182
orientation='portrait', **kwargs):
183183

184-
185-
FigureCanvasAgg.print_figure(self, filename, dpi, facecolor, edgecolor, orientation,
184+
agg = self.switch_backends(FigureCanvasAgg)
185+
agg.print_figure(filename, dpi, facecolor, edgecolor, orientation,
186186
**kwargs)
187-
self.draw_idle()
187+
self.figure.set_canvas(self)
188188

189189
def motion_notify_event(self, event):
190190
x = event.x

0 commit comments

Comments
 (0)