<divid="unreleased-message"> You are reading an old version of the documentation (v3.4.2). For the latest version see <ahref="https://matplotlib.org/stable/api/tight_bbox_api.html">https://matplotlib.org/stable/api/tight_bbox_api.html</a></div>
<spanid="matplotlib-tight-bbox"></span><h1><codeclass="docutils literal notranslate"><spanclass="pre">matplotlib.tight_bbox</span></code><aclass="headerlink" href="#module-matplotlib.tight_bbox" title="Permalink to this headline">¶</a></h1>
<p>Helper module for the <em>bbox_inches</em> parameter in <aclass="reference internal" href="figure_api.html#matplotlib.figure.Figure.savefig" title="matplotlib.figure.Figure.savefig"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Figure.savefig</span></code></a>.</p>
<dlclass="py function">
<dtid="matplotlib.tight_bbox.adjust_bbox">
<codeclass="descclassname">matplotlib.tight_bbox.</code><codeclass="descname">adjust_bbox</code><spanclass="sig-paren">(</span><em><spanclass="n">fig</span></em>, <em><spanclass="n">bbox_inches</span></em>, <em><spanclass="n">fixed_dpi</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/tight_bbox.html#adjust_bbox"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.tight_bbox.adjust_bbox" title="Permalink to this definition">¶</a></dt>
<dd><p>Temporarily adjust the figure so that only the specified area
(bbox_inches) is saved.</p>
<p>It modifies fig.bbox, fig.bbox_inches,
fig.transFigure._boxout, and fig.patch. While the figure size
changes, the scale of the original figure is conserved. A
function which restores the original values are returned.</p>
<codeclass="descclassname">matplotlib.tight_bbox.</code><codeclass="descname">process_figure_for_rasterizing</code><spanclass="sig-paren">(</span><em><spanclass="n">fig</span></em>, <em><spanclass="n">bbox_inches_restore</span></em>, <em><spanclass="n">fixed_dpi</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/tight_bbox.html#process_figure_for_rasterizing"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.tight_bbox.process_figure_for_rasterizing" title="Permalink to this definition">¶</a></dt>
<dd><p>A function that needs to be called when figure dpi changes during the
drawing (e.g., rasterizing). It recovers the bbox and re-adjust it with