Skip to content

Commit

Permalink
bugfix: set_tight works on non-standard figure sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
Austin Howard committed May 30, 2014
1 parent d1e328d commit 34f8e5d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kaplot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1037,8 +1037,6 @@ def color_marker_fill_index(cnt,clist,mlist,flist):
mpobj.legend(prop=k.SETTINGS['leg_fprop'],**k.SETTINGS['leg_props'])
# make copy of the entire object
self._LAYER_PLT_OBJECT.append(mpobj)
if self.PLOT_SETTINGS['tight_layout']:
plt.tight_layout(pad=1.0)
return

def saveMe(self,fname,**kwargs):
Expand All @@ -1061,6 +1059,8 @@ def saveMe(self,fname,**kwargs):
fig.set_size_inches(sf['width'],sf['height'])
sf.pop('width')
sf.pop('height')
if self.PLOT_SETTINGS['tight_layout']:
plt.tight_layout(pad=1.0)
plt.savefig(fname,**sf)
return

Expand Down

0 comments on commit 34f8e5d

Please sign in to comment.