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

Skip to content

Commit a99fe3d

Browse files
committed
fixed a bug in qt4's save_figure function
svn path=/trunk/matplotlib/; revision=2531
1 parent f8bc366 commit a99fe3d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/matplotlib/backends/backend_qt4.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ def __init__( self, parent, canvas ):
244244
# Layout toolbar buttons horizontally.
245245
self.layout = QtGui.QHBoxLayout( self )
246246
self.layout.setMargin( 2 )
247+
self.layout.setSpacing( 0 )
247248

248249
NavigationToolbar2.__init__( self, canvas )
249250

@@ -303,7 +304,7 @@ def draw_rubberband( self, event, x0, y0, x1, y1 ):
303304
def save_figure( self ):
304305
fname = QtGui.QFileDialog.getSaveFileName()
305306
if fname:
306-
self.canvas.print_figure( fname.latin1() )
307+
self.canvas.print_figure( str(fname.toLatin1()) )
307308

308309
# set icon used when windows are minimized
309310
try:

0 commit comments

Comments
 (0)