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

Skip to content

Commit 9e79b0a

Browse files
committed
update figure tight_layout parameters
Before, setting figure.autolayout=True and using the pgf backend would give /home/ismo/.local/lib/python3.5/site-packages/matplotlib-1.5.0rc2+118.g2da076a.dirty-py3.5-linux-x86_64.egg/matplotlib/figure.py:1720: UserWarning: This figure includes Axes that are not compatible with tight_layout, so its results might be incorrect. warnings.warn("This figure includes Axes that are not "
1 parent 1ec61ee commit 9e79b0a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/matplotlib/figure.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1728,6 +1728,10 @@ def tight_layout(self, renderer=None, pad=1.08, h_pad=None,
17281728
rect=rect)
17291729

17301730
self.subplots_adjust(**kwargs)
1731+
self._tight_parameters.update(
1732+
(k, v) for k, v in six.iteritems(
1733+
dict(pad=pad, h_pad=h_pad, w_pad=w_pad, rect=rect))
1734+
if v is not None)
17311735

17321736

17331737
def figaspect(arg):

0 commit comments

Comments
 (0)