OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Matplotlib Error: "figure includes Axes that are not compatible with tight_layout"

  • Thread starter Thread starter orome
  • Start date Start date
O

orome

Guest
After adding

Code:
bbox_inches="tight"

to an invocation of plt.savefig that has worked for several years, I get

/usr/local/lib/python2.7/site-packages/matplotlib/figure.py:1744: UserWarning:

This figure includes Axes that are not compatible with tight_layout, so its results might be incorrect

The figure in question appears to work (without truncation of annotations now), but I wonder what this error could mean and whether there's anything obvious or known (without digging deep into complex figure code) that I can do to address it.

Is there some known or common cause for this that I should look for in my code?
<p>After adding</p>
<pre><code>bbox_inches="tight"
</code></pre>
<p>to an invocation of <code>plt.savefig</code> that has worked for several years, I get</p>
<blockquote>
<p>/usr/local/lib/python2.7/site-packages/matplotlib/figure.py:1744: UserWarning:</p>
<p>This figure includes Axes that are not compatible with tight_layout, so its results might be incorrect</p>
</blockquote>
<p>The figure in question appears to work (without <a href="https://stackoverflow.com/q/29901422/656912">truncation of annotations</a> now), but I wonder what this error could mean and whether there's anything obvious or known (without digging deep into complex figure code) that I can do to address it.</p>
<p>Is there some known or common cause for this that I should look for in my code?</p>
 

Latest posts

Online statistics

Members online
1
Guests online
2
Total visitors
3
Top