Skip to content

Commit bdceb19

Browse files
author
y-p
committed
BLD: ipython_directive, enforce tight layout for mpl plots
1 parent 4fed03a commit bdceb19

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

doc/sphinxext/ipython_directive.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,9 @@ def save_image(self, image_file):
489489
Saves the image file to disk.
490490
"""
491491
self.ensure_pyplot()
492-
command = 'plt.gcf().savefig("%s")'%image_file
492+
command = ('plt.gcf().savefig("%s", bbox_inches="tight", '
493+
'dpi=100)' % image_file)
494+
493495
#print 'SAVEFIG', command # dbg
494496
self.process_input_line('bookmark ipy_thisdir', store_history=False)
495497
self.process_input_line('cd -b ipy_savedir', store_history=False)

0 commit comments

Comments
 (0)