DOC: Save plots with tight bounding boxes.

This commit is contained in:
Stefan van der Walt
2011-07-16 11:09:23 -05:00
parent bddde929b8
commit 2646d98609
+3 -1
View File
@@ -575,7 +575,9 @@ def render_figures(code, code_path, output_dir, output_base, context,
images.append(img)
for format, dpi in formats:
try:
figman.canvas.figure.savefig(img.filename(format), dpi=dpi)
figman.canvas.figure.savefig(img.filename(format),
dpi=dpi,
bbox_inches='tight')
except exceptions.BaseException as err:
raise PlotError(traceback.format_exc())
img.formats.append(format)