Skip to content

Commit

Permalink
improve margins on savefig command for kml
Browse files Browse the repository at this point in the history
  • Loading branch information
rjleveque committed Apr 18, 2020
1 parent 24c2fcb commit f0d1bf5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/python/visclaw/frametools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1077,10 +1077,14 @@ def printfig(fname='',frameno='', figno='', format='png', plotdir='.', \
a.set_yticks([])

plt.axis('off')

if kml_figsize is not None:
fig.set_size_inches(kml_figsize[0],kml_figsize[1])
plt.savefig(fname, transparent=True, bbox_inches='tight', \
pad_inches=0,dpi=kml_dpi)
a.set_frame_on(False)
plt.subplots_adjust(top = 1, bottom = 0, right = 1, left = 0,
hspace = 0, wspace = 0)
plt.margins(0,0)
plt.savefig(fname, transparent=True, bbox_inches='tight',dpi=kml_dpi)
else:
plt.savefig(fname, bbox_inches=bbox_inches)

Expand Down

0 comments on commit f0d1bf5

Please sign in to comment.