You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
<divid="unreleased-message"> You are reading an old version of the documentation (v3.2.0). For the latest version see <ahref="/stable/">https://matplotlib.org/stable/</a></div>
<li><aclass="reference internal" href="#symlognorm-now-has-a-base-parameter"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">SymLogNorm</span></code> now has a <em>base</em> parameter</a></li>
<li><aclass="reference internal" href="#axes-and-axis">axes and axis</a></li>
<li><aclass="reference internal" href="#minor-argument-will-become-keyword-only"><codeclass="docutils literal notranslate"><spanclass="pre">minor</span></code> argument will become keyword-only</a></li>
<h4>Reduced default value of <codeclass="docutils literal notranslate"><aclass="reference external" href="../tutorials/introductory/customizing.html?highlight=axes.formatter.limits#a-sample-matplotlibrc-file"><spanclass="pre">rcParams["axes.formatter.limits"]</span></a></code> (default: [-5, 6])<aclass="headerlink" href="#reduced-default-value-of-rcparams-axes-formatter-limits-default-5-6" title="Permalink to this headline">¶</a></h4>
<p>Changed the default value of <codeclass="docutils literal notranslate"><aclass="reference external" href="../tutorials/introductory/customizing.html?highlight=axes.formatter.limits#a-sample-matplotlibrc-file"><spanclass="pre">rcParams["axes.formatter.limits"]</span></a></code> (default: [-5, 6]) from -7, 7 to
<h4><aclass="reference internal" href="colorbar_api.html#matplotlib.colorbar.Colorbar" title="matplotlib.colorbar.Colorbar"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">matplotlib.colorbar.Colorbar</span></code></a> uses un-normalized axes for all mappables<aclass="headerlink" href="#matplotlib-colorbar-colorbar-uses-un-normalized-axes-for-all-mappables" title="Permalink to this headline">¶</a></h4>
all axes limits between 0 and 1 and had custom tickers to handle the
labelling of the colorbar ticks. After 3.0, colorbars constructed from
mappables that were <em>not</em> contours were constructed with axes that had
limits between <codeclass="docutils literal notranslate"><spanclass="pre">vmin</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">vmax</span></code> of the mappable's norm, and the tickers
were made children of the normal axes tickers.</p>
<p>This version of Matplotlib extends that to mappables made by contours, and
allows the axes to run between the lowest boundary in the contour and the
highest.</p>
<p>Code that worked around the normalization between 0 and 1 will need to be
modified.</p>
</div>
<divclass="section" id="moviewriterregistry">
<h4><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">MovieWriterRegistry</span></code><aclass="headerlink" href="#moviewriterregistry" title="Permalink to this headline">¶</a></h4>
<p><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">MovieWriterRegistry</span></code> now always checks the availability of the writer classes
before returning them. If one wishes, for example, to get the first available
writer, without performing the availability check on subsequent writers, it is
now possible to iterate over the registry, which will yield the names of the
available classes.</p>
</div>
<divclass="section" id="autoscaling">
<h4>Autoscaling<aclass="headerlink" href="#autoscaling" title="Permalink to this headline">¶</a></h4>
<p>Matplotlib used to recompute autoscaled limits after every plotting
(<codeclass="docutils literal notranslate"><spanclass="pre">plot()</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">bar()</span></code>, etc.) call. It now only does so when actually
rendering the canvas, or when the user queries the Axes limits. This is a
major performance improvement for plots with a large number of artists.</p>
<p>In particular, this means that artists added manually with <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Axes.add_line</span></code>,
<codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Axes.add_patch</span></code>, etc. will be taken into account by the autoscale, even
without an explicit call to <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Axes.autoscale_view</span></code>.</p>
<p>In some cases, this can result in different limits being reported. If this is
an issue, consider triggering a draw with <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">fig.canvas.draw</span></code>.</p>
<p>Autoscaling has also changed for artists that are based on the <aclass="reference internal" href="collections_api.html#matplotlib.collections.Collection" title="matplotlib.collections.Collection"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Collection</span></code></a>
class. Previously, the method that calculates the automatic limits
<aclass="reference internal" href="collections_api.html#matplotlib.collections.Collection.get_datalim" title="matplotlib.collections.Collection.get_datalim"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Collection.get_datalim</span></code></a> tried to take into account the size of objects
in the collection and make the limits large enough to not clip any of the
object, i.e., for <aclass="reference internal" href="_as_gen/matplotlib.axes.Axes.scatter.html#matplotlib.axes.Axes.scatter" title="matplotlib.axes.Axes.scatter"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Axes.scatter</span></code></a> it would make the limits large enough to not
clip any markers in the scatter. This is problematic when the object size is
specified in physical space, or figure-relative space, because the transform
from physical units to data limits requires knowing the data limits, and
becomes invalid when the new limits are applied. This is an inverse
problem that is theoretically solvable (if the object is physically smaller
than the axes), but the extra complexity was not deemed worth it, particularly
as the most common use case is for markers in scatter that are usually small
enough to be accommodated by the default data limit margins.</p>
<p>While the new behavior is algorithmically simpler, it is conditional on
properties of the <aclass="reference internal" href="collections_api.html#matplotlib.collections.Collection" title="matplotlib.collections.Collection"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Collection</span></code></a> object:</p>
<blockquote>
<div><olclass="arabic simple">
<li><codeclass="docutils literal notranslate"><spanclass="pre">offsets</span><spanclass="pre">=</span><spanclass="pre">None</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">transform</span></code> is a child of <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Axes.transData</span></code>: use the paths
for the automatic limits (i.e. for <aclass="reference internal" href="collections_api.html#matplotlib.collections.LineCollection" title="matplotlib.collections.LineCollection"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">LineCollection</span></code></a> in <aclass="reference internal" href="_as_gen/matplotlib.axes.Axes.streamplot.html#matplotlib.axes.Axes.streamplot" title="matplotlib.axes.Axes.streamplot"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Axes.streamplot</span></code></a>).</li>
<li><codeclass="docutils literal notranslate"><spanclass="pre">offsets</span><spanclass="pre">!=</span><spanclass="pre">None</span></code>, and <codeclass="docutils literal notranslate"><spanclass="pre">offset_transform</span></code> is child of <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Axes.transData</span></code>:</li>
</ol>
<blockquote>
<div><olclass="loweralpha simple">
<li><dlclass="first docutils">
<dt><codeclass="docutils literal notranslate"><spanclass="pre">transform</span></code> is child of <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Axes.transData</span></code>: use the <codeclass="docutils literal notranslate"><spanclass="pre">path</span><spanclass="pre">+</span><spanclass="pre">offset</span></code> for</dt><dd>limits (i.e., for <aclass="reference internal" href="_as_gen/matplotlib.axes.Axes.bar.html#matplotlib.axes.Axes.bar" title="matplotlib.axes.Axes.bar"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Axes.bar</span></code></a>).</dd>
</dl>
</li>
<li><dlclass="first docutils">
<dt><codeclass="docutils literal notranslate"><spanclass="pre">transform</span></code> is not a child of <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Axes.transData</span></code>: just use the offsets</dt><dd>for the limits (i.e. for scatter)</dd>
<h4>log-scale bar() / hist() autolimits<aclass="headerlink" href="#log-scale-bar-hist-autolimits" title="Permalink to this headline">¶</a></h4>
<p>The autolimits computation in <aclass="reference internal" href="_as_gen/matplotlib.axes.Axes.bar.html#matplotlib.axes.Axes.bar" title="matplotlib.axes.Axes.bar"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">bar</span></code></a> and <aclass="reference internal" href="_as_gen/matplotlib.axes.Axes.hist.html#matplotlib.axes.Axes.hist" title="matplotlib.axes.Axes.hist"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">hist</span></code></a> when the axes
already uses log-scale has changed to match the computation when the axes is
switched to log-scale after the call to <aclass="reference internal" href="_as_gen/matplotlib.axes.Axes.bar.html#matplotlib.axes.Axes.bar" title="matplotlib.axes.Axes.bar"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">bar</span></code></a> and <aclass="reference internal" href="_as_gen/matplotlib.axes.Axes.hist.html#matplotlib.axes.Axes.hist" title="matplotlib.axes.Axes.hist"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">hist</span></code></a>, and
when calling <codeclass="docutils literal notranslate"><spanclass="pre">bar(...,</span><spanclass="pre">log=True)</span></code> / <codeclass="docutils literal notranslate"><spanclass="pre">hist(...,</span><spanclass="pre">log=True)</span></code>: if there are
at least two different bar heights, add the normal axes margins to them (in
log-scale); if there is only a single bar height, expand the axes limits by one
order of magnitude around it and then apply axes margins.</p>
<h4>Axes labels spanning multiple rows/columns<aclass="headerlink" href="#axes-labels-spanning-multiple-rows-columns" title="Permalink to this headline">¶</a></h4>
<p><codeclass="docutils literal notranslate"><spanclass="pre">Axes.label_outer</span></code> now correctly keep the x labels and tick labels visible
for Axes spanning multiple rows, as long as they cover the last row of the Axes
grid. (This is consistent with keeping the y labels and tick labels visible
for Axes spanning multiple columns as long as they cover the first column of
the Axes grid.)</p>
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">Axes.is_last_row</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">Axes.is_last_col</span></code> methods now correctly return
True for Axes spanning multiple rows, as long as they cover the last row or
column respectively. Again this is consistent with the behavior for axes
covering the first row or column.</p>
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">Axes.rowNum</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">Axes.colNum</span></code> attributes are deprecated, as they only
refer to the first grid cell covered by the Axes. Instead, use the new
<codeclass="docutils literal notranslate"><spanclass="pre">ax.get_subplotspec().rowspan</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">ax.get_subplotspec().colspan</span></code>
properties, which are <aclass="reference external" href="https://docs.python.org/3/library/stdtypes.html#range" title="(in Python v3.8)"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">range</span></code></a> objects indicating the whole span of rows and
columns covered by the subplot.</p>
<p>(Note that all methods and attributes mentioned here actually only exist on
the <codeclass="docutils literal notranslate"><spanclass="pre">Subplot</span></code> subclass of <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Axes</span></code>, which is used for grid-positioned Axes but
not for Axes positioned directly in absolute coordinates.)</p>
<p>The <aclass="reference internal" href="_as_gen/matplotlib.gridspec.GridSpec.html#matplotlib.gridspec.GridSpec" title="matplotlib.gridspec.GridSpec"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">GridSpec</span></code></a> class gained the <codeclass="docutils literal notranslate"><spanclass="pre">nrows</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">ncols</span></code> properties as more
explicit synonyms for the parameters returned by <codeclass="docutils literal notranslate"><spanclass="pre">GridSpec.get_geometry</span></code>.</p>
</div>
<divclass="section" id="locators">
<h4>Locators<aclass="headerlink" href="#locators" title="Permalink to this headline">¶</a></h4>
<p>When more than <aclass="reference internal" href="ticker_api.html#matplotlib.ticker.Locator.MAXTICKS" title="matplotlib.ticker.Locator.MAXTICKS"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Locator.MAXTICKS</span></code></a> ticks are generated, the behavior of
<aclass="reference internal" href="ticker_api.html#matplotlib.ticker.Locator.raise_if_exceeds" title="matplotlib.ticker.Locator.raise_if_exceeds"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Locator.raise_if_exceeds</span></code></a> changed from raising a RuntimeError to emitting a
log at WARNING level.</p>
</div>
<divclass="section" id="nonsingular-locators">
<h4>nonsingular Locators<aclass="headerlink" href="#nonsingular-locators" title="Permalink to this headline">¶</a></h4>
<p><codeclass="docutils literal notranslate"><spanclass="pre">Locator.nonsingular</span></code> (introduced in mpl 3.1), <codeclass="docutils literal notranslate"><spanclass="pre">DateLocator.nonsingular</span></code>, and
<codeclass="docutils literal notranslate"><spanclass="pre">AutoDateLocator.nonsingular</span></code> now returns a range <codeclass="docutils literal notranslate"><spanclass="pre">v0,</span><spanclass="pre">v1</span></code> with <codeclass="docutils literal notranslate"><spanclass="pre">v0</span><spanclass="pre"><=</span><spanclass="pre">v1</span></code>.
This behavior is consistent with the implementation of <codeclass="docutils literal notranslate"><spanclass="pre">nonsingular</span></code> by the
<codeclass="docutils literal notranslate"><spanclass="pre">LogLocator</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">LogitLocator</span></code> subclasses.</p>
</div>
<divclass="section" id="get-data-ratio">
<h4><codeclass="docutils literal notranslate"><spanclass="pre">get_data_ratio</span></code><aclass="headerlink" href="#get-data-ratio" title="Permalink to this headline">¶</a></h4>
<p><codeclass="docutils literal notranslate"><spanclass="pre">Axes.get_data_ratio</span></code> now takes the axes scale into account (linear, log,
logit, etc.) before computing the y-to-x ratio. This change allows fixed
aspects to be applied to any combination of x and y scales.</p>
</div>
<divclass="section" id="artist-sticky-edges">
<h4>Artist sticky edges<aclass="headerlink" href="#artist-sticky-edges" title="Permalink to this headline">¶</a></h4>
<p>Previously, the <codeclass="docutils literal notranslate"><spanclass="pre">sticky_edges</span></code> attribute of artists was a list of values such
that if an axis limit coincides with a sticky edge, it would not be expanded by
the axes margins (this is the mechanism that e.g. prevents margins from being
added around images).</p>
<p><codeclass="docutils literal notranslate"><spanclass="pre">sticky_edges</span></code> now have an additional effect on margins application: even if
an axis limit did not coincide with a sticky edge, it cannot <em>cross</em> a sticky
edge through margin application -- instead, the margins will only expand the
axis limit until it bumps against the sticky edge.</p>
<p>This change improves the margins of axes displaying a <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">streamplot</span></code>:</p>
<ulclass="simple">
<li>if the streamplot goes all the way to the edges of the vector field, then the
axis limits are set to match exactly the vector field limits (whereas they
would sometimes be off by a small floating point error previously).</li>
<li>if the streamplot does not reach the edges of the vector field (e.g., due to
the use of <codeclass="docutils literal notranslate"><spanclass="pre">start_points</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">maxlength</span></code>), then margins expansion will
not cross the vector field limits anymore.</li>
</ul>
<p>This change is also used internally to ensure that polar plots don't display
negative <em>r</em> values unless the user really passes in a negative value.</p>
</div>
<divclass="section" id="gid-in-svg-output">
<h4><codeclass="docutils literal notranslate"><spanclass="pre">gid</span></code> in svg output<aclass="headerlink" href="#gid-in-svg-output" title="Permalink to this headline">¶</a></h4>
<p>Previously, if a figure, axis, legend or some other artists had a custom
<codeclass="docutils literal notranslate"><spanclass="pre">gid</span></code> set (e.g. via <codeclass="docutils literal notranslate"><spanclass="pre">.set_gid()</span></code>), this would not be reflected in
the svg output. Instead a default gid, like <codeclass="docutils literal notranslate"><spanclass="pre">figure_1</span></code> would be shown.
This is now fixed, such that e.g. <codeclass="docutils literal notranslate"><spanclass="pre">fig.set_gid("myfigure")</span></code> correctly
shows up as <codeclass="docutils literal notranslate"><spanclass="pre"><g</span><spanclass="pre">id="myfigure"></span></code> in the svg file. If you relied on the
gid having the default format, you now need to make sure not to set the
<codeclass="docutils literal notranslate"><spanclass="pre">gid</span></code> parameter of the artists.</p>
</div>
<divclass="section" id="fonts">
<h4>Fonts<aclass="headerlink" href="#fonts" title="Permalink to this headline">¶</a></h4>
<p>Font weight guessing now first checks for the presence of the FT_STYLE_BOLD_FLAG
before trying to match substrings in the font name. In particular, this means
that Times New Roman Bold is now correctly detected as bold, not normal weight.</p>
</div>
<divclass="section" id="color-like-checking">
<h4>Color-like checking<aclass="headerlink" href="#color-like-checking" title="Permalink to this headline">¶</a></h4>
<p><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">matplotlib.color.is_colorlike()</span></code> used to return True for all string
representations of floats. However, only those with values in 0-1 are valid
colors (representing grayscale values). <codeclass="docutils literal notranslate"><spanclass="pre">is_colorlike()</span></code> now returns False
for string representations of floats outside 0-1.</p>
<h4>Default image interpolation<aclass="headerlink" href="#default-image-interpolation" title="Permalink to this headline">¶</a></h4>
<p>Images displayed in Matplotlib previously used nearest-neighbor
interpolation, leading to aliasing effects for downscaling and non-integer
upscaling.</p>
<p>New default for <codeclass="docutils literal notranslate"><aclass="reference external" href="../tutorials/introductory/customizing.html?highlight=image.interpolation#a-sample-matplotlibrc-file"><spanclass="pre">rcParams["image.interpolation"]</span></a></code> (default: 'antialiased') is the new option "antialiased".
<codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">imshow(A,</span><spanclass="pre">interpolation='antialiased')</span></code> will apply a Hanning filter when
resampling the data in A for display (or saving to file) <em>if</em> the upsample
rate is less than a factor of three, and not an integer; downsampled data is
always smoothed at resampling.</p>
<p>To get the old behavior, set <codeclass="docutils literal notranslate"><aclass="reference external" href="../tutorials/introductory/customizing.html?highlight=image.interpolation#a-sample-matplotlibrc-file"><spanclass="pre">rcParams["image.interpolation"]</span></a></code> (default: 'antialiased') to the old default "nearest"
(or specify the <codeclass="docutils literal notranslate"><spanclass="pre">interpolation</span></code> kwarg of <aclass="reference internal" href="_as_gen/matplotlib.axes.Axes.imshow.html#matplotlib.axes.Axes.imshow" title="matplotlib.axes.Axes.imshow"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Axes.imshow</span></code></a>)</p>
<p>To always get the anti-aliasing behavior, no matter what the up/down sample
rate, set <codeclass="docutils literal notranslate"><aclass="reference external" href="../tutorials/introductory/customizing.html?highlight=image.interpolation#a-sample-matplotlibrc-file"><spanclass="pre">rcParams["image.interpolation"]</span></a></code> (default: 'antialiased') to "hanning" (or one of the other filters
available).</p>
<p>Note that the "hanning" filter was chosen because it has only a modest
performance penalty. Anti-aliasing can be improved with other filters.</p>
</div>
<divclass="section" id="rcparams">
<h4>rcParams<aclass="headerlink" href="#rcparams" title="Permalink to this headline">¶</a></h4>
<p>When using <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">RendererSVG</span></code> with <codeclass="docutils literal notranslate"><spanclass="pre">rcParams["svg.image_inline"]</span><spanclass="pre">==</span>
<spanclass="pre">True</span></code>, externally written images now use a single counter even if the
<codeclass="docutils literal notranslate"><spanclass="pre">renderer.basename</span></code> attribute is overwritten, rather than a counter per
basename.</p>
<p>This change will only affect you if you used <codeclass="docutils literal notranslate"><spanclass="pre">rcParams["svg.image_inline"]</span><spanclass="pre">=</span><spanclass="pre">True</span></code>
(the default is False) <em>and</em> manually modified <codeclass="docutils literal notranslate"><spanclass="pre">renderer.basename</span></code>.</p>
<p>Changed the default value of <codeclass="docutils literal notranslate"><aclass="reference external" href="../tutorials/introductory/customizing.html?highlight=axes.formatter.limits#a-sample-matplotlibrc-file"><spanclass="pre">rcParams["axes.formatter.limits"]</span></a></code> (default: [-5, 6]) from -7, 7 to -5, 6
for better readability.</p>
</div>
<divclass="section" id="add-subplot">
<h4><codeclass="docutils literal notranslate"><spanclass="pre">add_subplot()</span></code><aclass="headerlink" href="#add-subplot" title="Permalink to this headline">¶</a></h4>
<p><aclass="reference internal" href="_as_gen/matplotlib.figure.Figure.html#matplotlib.figure.Figure.add_subplot" title="matplotlib.figure.Figure.add_subplot"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Figure.add_subplot()</span></code></a> and <aclass="reference internal" href="_as_gen/matplotlib.pyplot.subplot.html#matplotlib.pyplot.subplot" title="matplotlib.pyplot.subplot"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">pyplot.subplot()</span></code></a> do not accept a <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">figure</span></code>
keyword argument anymore. It only used to work anyway if the passed figure
was <codeclass="docutils literal notranslate"><spanclass="pre">self</span></code> or the current figure, respectively.</p>
</div>
<divclass="section" id="indicate-inset">
<h4><codeclass="docutils literal notranslate"><spanclass="pre">indicate_inset()</span></code><aclass="headerlink" href="#indicate-inset" title="Permalink to this headline">¶</a></h4>
<aclass="reference internal" href="_as_gen/matplotlib.axes.Axes.indicate_inset_zoom.html#matplotlib.axes.Axes.indicate_inset_zoom" title="matplotlib.axes.Axes.indicate_inset_zoom"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">indicate_inset_zoom</span></code></a> were documented as returning
a 4-tuple of <aclass="reference internal" href="_as_gen/matplotlib.patches.ConnectionPatch.html#matplotlib.patches.ConnectionPatch" title="matplotlib.patches.ConnectionPatch"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">ConnectionPatch</span></code></a>, where in fact they
returned a 4-length list.</p>
<p>They now correctly return a 4-tuple.
<aclass="reference internal" href="_as_gen/matplotlib.axes.Axes.indicate_inset.html#matplotlib.axes.Axes.indicate_inset" title="matplotlib.axes.Axes.indicate_inset"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">indicate_inset</span></code></a> would previously raise an error if
the optional <em>inset_ax</em> was not supplied; it now completes successfully,
and returns <em>None</em> instead of the tuple of <codeclass="docutils literal notranslate"><spanclass="pre">ConnectionPatch</span></code>.</p>
</div>
<divclass="section" id="pgf-backend">
<h4>PGF backend<aclass="headerlink" href="#pgf-backend" title="Permalink to this headline">¶</a></h4>
<p>The pgf backend's get_canvas_width_height now returns the canvas size in
display units rather than in inches, which it previously did.
The new behavior is the correct one given the uses of <codeclass="docutils literal notranslate"><spanclass="pre">get_canvas_width_height</span></code>
in the rest of the codebase.</p>
<p>The pgf backend now includes images using <codeclass="docutils literal notranslate"><spanclass="pre">\includegraphics</span></code> instead of
<codeclass="docutils literal notranslate"><spanclass="pre">\pgfimage</span></code> if the version of <codeclass="docutils literal notranslate"><spanclass="pre">graphicx</span></code> is recent enough to support the
<codeclass="docutils literal notranslate"><spanclass="pre">interpolate</span></code> option (this is detected automatically).</p>
</div>
<divclass="section" id="cbook">
<h4><aclass="reference internal" href="cbook_api.html#module-matplotlib.cbook" title="matplotlib.cbook"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">cbook</span></code></a><aclass="headerlink" href="#cbook" title="Permalink to this headline">¶</a></h4>
<p>The default value of the "obj_type" parameter to <codeclass="docutils literal notranslate"><spanclass="pre">cbook.warn_deprecated</span></code> has
been changed from "attribute" (a default that was never used internally) to the
empty string.</p>
</div>
<divclass="section" id="testing">
<h4>Testing<aclass="headerlink" href="#testing" title="Permalink to this headline">¶</a></h4>
<p>The test suite no longer turns on the Python fault handler by default.
Set the standard <codeclass="docutils literal notranslate"><spanclass="pre">PYTHONFAULTHANDLER</span></code> environment variable to do so.</p>
</div>
<divclass="section" id="backend-supports-blit">
<h4>Backend <codeclass="docutils literal notranslate"><spanclass="pre">supports_blit</span></code><aclass="headerlink" href="#backend-supports-blit" title="Permalink to this headline">¶</a></h4>
<p>Backends do not need to explicitly define the flag <codeclass="docutils literal notranslate"><spanclass="pre">supports_blit</span></code> anymore.
This is only relevant for backend developers. Backends had to define the flag
<codeclass="docutils literal notranslate"><spanclass="pre">supports_blit</span></code>. This is not needed anymore because the blitting capability
is now automatically detected.</p>
</div>
<divclass="section" id="exception-changes">
<h4>Exception changes<aclass="headerlink" href="#exception-changes" title="Permalink to this headline">¶</a></h4>
<p>Various APIs that raised a <aclass="reference external" href="https://docs.python.org/3/library/exceptions.html#ValueError" title="(in Python v3.8)"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">ValueError</span></code></a> for incorrectly typed inputs now raise
many classes in the <aclass="reference internal" href="transformations.html#module-matplotlib.transforms" title="matplotlib.transforms"><codeclass="xref py py-mod docutils literal notranslate"><spanclass="pre">matplotlib.transforms</span></code></a> module and <aclass="reference internal" href="tri_api.html#module-matplotlib.tri" title="matplotlib.tri"><codeclass="xref py py-mod docutils literal notranslate"><spanclass="pre">matplotlib.tri</span></code></a>
package, and Axes methods that take a <codeclass="docutils literal notranslate"><spanclass="pre">norm</span></code> parameter.</p>
<p>If extra kwargs are passed to <aclass="reference internal" href="scale_api.html#matplotlib.scale.LogScale" title="matplotlib.scale.LogScale"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">LogScale</span></code></a>, <aclass="reference external" href="https://docs.python.org/3/library/exceptions.html#TypeError" title="(in Python v3.8)"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">TypeError</span></code></a> will now be
<h4>mplot3d auto-registration<aclass="headerlink" href="#mplot3d-auto-registration" title="Permalink to this headline">¶</a></h4>
<p><aclass="reference internal" href="toolkits/mplot3d.html#module-mpl_toolkits.mplot3d" title="mpl_toolkits.mplot3d"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">mpl_toolkits.mplot3d</span></code></a> is always registered by default now. It is no
longer necessary to import mplot3d to create 3d axes with</p>
<h4><aclass="reference internal" href="_as_gen/matplotlib.colors.SymLogNorm.html#matplotlib.colors.SymLogNorm" title="matplotlib.colors.SymLogNorm"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">SymLogNorm</span></code></a> now has a <em>base</em> parameter<aclass="headerlink" href="#symlognorm-now-has-a-base-parameter" title="Permalink to this headline">¶</a></h4>
<p>Previously, <aclass="reference internal" href="_as_gen/matplotlib.colors.SymLogNorm.html#matplotlib.colors.SymLogNorm" title="matplotlib.colors.SymLogNorm"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">SymLogNorm</span></code></a> had no <em>base</em> keyword argument and the base was
hard-coded to <codeclass="docutils literal notranslate"><spanclass="pre">base=np.e</span></code>. This was inconsistent with the default
behavior of <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">SymLogScale</span></code> (which defaults to <codeclass="docutils literal notranslate"><spanclass="pre">base=10</span></code>) and the use
of the word "decade" in the documentation.</p>
<p>In preparation for changing the default base to 10, calling
<aclass="reference internal" href="_as_gen/matplotlib.colors.SymLogNorm.html#matplotlib.colors.SymLogNorm" title="matplotlib.colors.SymLogNorm"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">SymLogNorm</span></code></a> without the new <em>base</em> kwarg emits a deprecation
warning.</p>
</div>
</div>
<divclass="section" id="deprecations">
<h3><aclass="toc-backref" href="#id6">Deprecations</a><aclass="headerlink" href="#deprecations" title="Permalink to this headline">¶</a></h3>
<divclass="section" id="matplotlib-use">
<h4><aclass="reference internal" href="matplotlib_configuration_api.html#matplotlib.use" title="matplotlib.use"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">matplotlib.use</span></code></a><aclass="headerlink" href="#matplotlib-use" title="Permalink to this headline">¶</a></h4>
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">warn</span></code> parameter to <aclass="reference internal" href="matplotlib_configuration_api.html#matplotlib.use" title="matplotlib.use"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">matplotlib.use()</span></code></a> is deprecated (catch the
<aclass="reference external" href="https://docs.python.org/3/library/exceptions.html#ImportError" title="(in Python v3.8)"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">ImportError</span></code></a> emitted on backend switch failure and reemit a warning yourself
if so desired).</p>
</div>
<divclass="section" id="plotfile">
<h4>plotfile<aclass="headerlink" href="#plotfile" title="Permalink to this headline">¶</a></h4>
<p><aclass="reference internal" href="_as_gen/matplotlib.pyplot.plotfile.html#matplotlib.pyplot.plotfile" title="matplotlib.pyplot.plotfile"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">pyplot.plotfile</span></code></a> is deprecated in favor of separately loading and plotting
the data. See <aclass="reference internal" href="../gallery/misc/plotfile_demo_sgskip.html"><spanclass="doc">Plotting data from a file</span></a> for various ways to
use pandas or NumPy to load data, and pandas or matplotlib to plot the
resulting data.</p>
</div>
<divclass="section" id="axes-and-axis">
<h4>axes and axis<aclass="headerlink" href="#axes-and-axis" title="Permalink to this headline">¶</a></h4>
or <codeclass="docutils literal notranslate"><spanclass="pre">Axis.minor.formatter</span></code> to an object that is not a subclass of <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Locator</span></code> or
<codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Formatter</span></code> (respectively) is deprecated. Note that these attributes should
usually be set using <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Axis.set_major_locator</span></code>, <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Axis.set_minor_locator</span></code>, etc.
which already raise an exception when an object of the wrong class is passed.</p>
<p>Passing more than one positional argument or unsupported keyword arguments to
<aclass="reference internal" href="_as_gen/matplotlib.axes.Axes.axis.html#matplotlib.axes.Axes.axis" title="matplotlib.axes.Axes.axis"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">axis()</span></code></a> is deprecated (such arguments used to be
<h4><codeclass="docutils literal notranslate"><spanclass="pre">minor</span></code> argument will become keyword-only<aclass="headerlink" href="#minor-argument-will-become-keyword-only" title="Permalink to this headline">¶</a></h4>
<p>Using the parameter <codeclass="docutils literal notranslate"><spanclass="pre">minor</span></code> to <codeclass="docutils literal notranslate"><spanclass="pre">get_*ticks()</span></code> / <codeclass="docutils literal notranslate"><spanclass="pre">set_*ticks()</span></code> as a
positional parameter is deprecated. It will become keyword-only in future
versions.</p>
</div>
<divclass="section" id="axes-grid1">
<h4><codeclass="docutils literal notranslate"><spanclass="pre">axes_grid1</span></code><aclass="headerlink" href="#axes-grid1" title="Permalink to this headline">¶</a></h4>
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">mpl_toolkits.axes_grid1.colorbar</span></code> module and its colorbar implementation
are deprecated in favor of <aclass="reference internal" href="colorbar_api.html#module-matplotlib.colorbar" title="matplotlib.colorbar"><codeclass="xref py py-mod docutils literal notranslate"><spanclass="pre">matplotlib.colorbar</span></code></a>, as the former is
essentially abandoned and the latter is a more featureful replacement with a
nearly compatible API (for example, the following additional keywords are
<li>Setting the ticks on the colorbar is done by calling <codeclass="docutils literal notranslate"><spanclass="pre">colorbar.set_ticks</span></code>
rather than <codeclass="docutils literal notranslate"><spanclass="pre">colorbar.cbar_axis.set_xticks</span></code> or
<codeclass="docutils literal notranslate"><spanclass="pre">colorbar.cbar_axis.set_yticks</span></code>; the <codeclass="docutils literal notranslate"><spanclass="pre">locator</span></code> parameter to <codeclass="docutils literal notranslate"><spanclass="pre">colorbar()</span></code>
is deprecated in favor of its synonym <codeclass="docutils literal notranslate"><spanclass="pre">ticks</span></code> (which already existed
previously, and is consistent with <aclass="reference internal" href="colorbar_api.html#module-matplotlib.colorbar" title="matplotlib.colorbar"><codeclass="xref py py-mod docutils literal notranslate"><spanclass="pre">matplotlib.colorbar</span></code></a>).</li>
<li>The colorbar's long axis is accessed with <codeclass="docutils literal notranslate"><spanclass="pre">colorbar.xaxis</span></code> or
<codeclass="docutils literal notranslate"><spanclass="pre">colorbar.yaxis</span></code> depending on the orientation, rather than
<li>Overdrawing multiple colorbars on top of one another in a single Axes (e.g.
when using the <codeclass="docutils literal notranslate"><spanclass="pre">cax</span></code> attribute of <aclass="reference internal" href="_as_gen/mpl_toolkits.axes_grid1.axes_grid.ImageGrid.html#mpl_toolkits.axes_grid1.axes_grid.ImageGrid" title="mpl_toolkits.axes_grid1.axes_grid.ImageGrid"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">ImageGrid</span></code></a>
elements) is not supported; if you previously relied on the second colorbar
being drawn over the first, you can call <codeclass="docutils literal notranslate"><spanclass="pre">cax.cla()</span></code> to clear the axes
before drawing the second colorbar.</li>
</ul>
<p>During the deprecation period, the <codeclass="docutils literal notranslate"><spanclass="pre">mpl_toolkits.legacy_colorbar</span></code>
rcParam can be set to True to use <codeclass="docutils literal notranslate"><spanclass="pre">mpl_toolkits.axes_grid1.colorbar</span></code> in
<aclass="reference internal" href="toolkits/axes_grid1.html#module-mpl_toolkits.axes_grid1" title="mpl_toolkits.axes_grid1"><codeclass="xref py py-mod docutils literal notranslate"><spanclass="pre">mpl_toolkits.axes_grid1</span></code></a> code with a deprecation warning (the default),
or to False to use <codeclass="docutils literal notranslate"><spanclass="pre">matplotlib.colorbar</span></code>.</p>
<p>Passing a <codeclass="docutils literal notranslate"><spanclass="pre">pad</span></code> size of <codeclass="docutils literal notranslate"><spanclass="pre">None</span></code> (the default) as a synonym for zero to
the <codeclass="docutils literal notranslate"><spanclass="pre">append_axes</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">new_horizontal</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">new_vertical</span></code> methods of
<aclass="reference internal" href="_as_gen/mpl_toolkits.axes_grid1.axes_divider.AxesDivider.html#mpl_toolkits.axes_grid1.axes_divider.AxesDivider" title="mpl_toolkits.axes_grid1.axes_divider.AxesDivider"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">axes_grid1.axes_divider.AxesDivider</span></code></a> is deprecated. In a future release, the
default value of <codeclass="docutils literal notranslate"><spanclass="pre">None</span></code> will mean "use <codeclass="docutils literal notranslate"><aclass="reference external" href="../tutorials/introductory/customizing.html?highlight=figure.subplot.wspace#a-sample-matplotlibrc-file"><spanclass="pre">rcParams["figure.subplot.wspace"]</span></a></code> (default: 0.2) or
<codeclass="docutils literal notranslate"><aclass="reference external" href="../tutorials/introductory/customizing.html?highlight=figure.subplot.hspace#a-sample-matplotlibrc-file"><spanclass="pre">rcParams["figure.subplot.hspace"]</span></a></code> (default: 0.2)" (depending on the orientation). Explicitly pass
<codeclass="docutils literal notranslate"><spanclass="pre">pad=0</span></code> to keep the old behavior.</p>
</div>
<divclass="section" id="axes3d">
<h4>Axes3D<aclass="headerlink" href="#axes3d" title="Permalink to this headline">¶</a></h4>
<p><codeclass="docutils literal notranslate"><spanclass="pre">mplot3d.axis3d.get_flip_min_max</span></code> is deprecated.</p>
<p><codeclass="docutils literal notranslate"><spanclass="pre">axes3d.unit_bbox</span></code> is deprecated (use <codeclass="docutils literal notranslate"><spanclass="pre">Bbox.unit</span></code> instead).</p>
<p><codeclass="docutils literal notranslate"><spanclass="pre">axes3d.Axes3D.w_xaxis</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">.w_yaxis</span></code>, and <codeclass="docutils literal notranslate"><spanclass="pre">.w_zaxis</span></code> are deprecated (use
<h4><aclass="reference internal" href="cm_api.html#module-matplotlib.cm" title="matplotlib.cm"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">matplotlib.cm</span></code></a><aclass="headerlink" href="#matplotlib-cm" title="Permalink to this headline">¶</a></h4>
<p><codeclass="docutils literal notranslate"><spanclass="pre">cm.revcmap</span></code> is deprecated. Use <aclass="reference internal" href="_as_gen/matplotlib.colors.Colormap.html#matplotlib.colors.Colormap.reversed" title="matplotlib.colors.Colormap.reversed"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Colormap.reversed</span></code></a> to reverse a colormap.</p>
<p><codeclass="docutils literal notranslate"><spanclass="pre">cm.datad</span></code> no longer contains entries for reversed colormaps in their
"unconverted" form.</p>
</div>
<divclass="section" id="axisartist">
<h4>axisartist<aclass="headerlink" href="#axisartist" title="Permalink to this headline">¶</a></h4>
<p><codeclass="docutils literal notranslate"><spanclass="pre">mpl_toolkits.axisartist.grid_finder.GridFinderBase</span></code> is deprecated (its
only use is to be inherited by the <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">GridFinder</span></code> class which just provides
more defaults in the constructor and directly sets the transforms, so
<codeclass="docutils literal notranslate"><spanclass="pre">GridFinderBase</span></code>'s methods were just moved to <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">GridFinder</span></code>).</p>
<p><codeclass="docutils literal notranslate"><spanclass="pre">AxisArtist.line</span></code> is now a <aclass="reference internal" href="_as_gen/matplotlib.patches.PathPatch.html#matplotlib.patches.PathPatch" title="matplotlib.patches.PathPatch"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">patches.PathPatch</span></code></a> instance instead of a
<p>Returning a factor equal to None from axisartist Locators (which are <strong>not</strong>
the same as "standard" tick Locators), or passing a factor equal to None
to axisartist Formatters (which are <strong>not</strong> the same as "standard" tick
Formatters) is deprecated. Pass a factor equal to 1 instead.</p>
<p>For the <aclass="reference internal" href="_as_gen/mpl_toolkits.axisartist.axis_artist.AttributeCopier.html#mpl_toolkits.axisartist.axis_artist.AttributeCopier" title="mpl_toolkits.axisartist.axis_artist.AttributeCopier"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">mpl_toolkits.axisartist.axis_artist.AttributeCopier</span></code></a> class, the
constructor and the <codeclass="docutils literal notranslate"><spanclass="pre">set_ref_artist</span></code> method, and the <em>default_value</em>
parameter of <codeclass="docutils literal notranslate"><spanclass="pre">get_attribute_from_ref_artist</span></code>, are deprecated.</p>
<p>Deprecation of the constructor means that classes inheriting from
<aclass="reference internal" href="_as_gen/mpl_toolkits.axisartist.axis_artist.AttributeCopier.html#mpl_toolkits.axisartist.axis_artist.AttributeCopier" title="mpl_toolkits.axisartist.axis_artist.AttributeCopier"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">AttributeCopier</span></code></a> should no longer call its constructor.</p>
</div>
<divclass="section" id="id1">
<h4>Locators<aclass="headerlink" href="#id1" title="Permalink to this headline">¶</a></h4>
<p>The unused <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Locator.autoscale()</span></code> method is deprecated (pass the axis limits to
<h4>Animation<aclass="headerlink" href="#animation" title="Permalink to this headline">¶</a></h4>
<p>The following methods and attributes of the <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">MovieWriterRegistry</span></code> class are
<h4><codeclass="docutils literal notranslate"><spanclass="pre">smart_bounds()</span></code><aclass="headerlink" href="#smart-bounds" title="Permalink to this headline">¶</a></h4>
<p>The "smart_bounds" functionality is deprecated. This includes
<codeclass="docutils literal notranslate"><spanclass="pre">Spine.set_smart_bounds()</span></code>, and <codeclass="docutils literal notranslate"><spanclass="pre">Spine.get_smart_bounds()</span></code>.</p>
</div>
<divclass="section" id="boxplot">
<h4><codeclass="docutils literal notranslate"><spanclass="pre">boxplot()</span></code><aclass="headerlink" href="#boxplot" title="Permalink to this headline">¶</a></h4>
<p>Setting the <codeclass="docutils literal notranslate"><spanclass="pre">whis</span></code> parameter of <aclass="reference internal" href="_as_gen/matplotlib.axes.Axes.boxplot.html#matplotlib.axes.Axes.boxplot" title="matplotlib.axes.Axes.boxplot"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Axes.boxplot</span></code></a> and <aclass="reference internal" href="cbook_api.html#matplotlib.cbook.boxplot_stats" title="matplotlib.cbook.boxplot_stats"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">cbook.boxplot_stats</span></code></a> to
"range" to mean "the whole data range" is deprecated; set it to (0, 100) (which
gets interpreted as percentiles) to achieve the same effect.</p>
</div>
<divclass="section" id="fill-between">
<h4><codeclass="docutils literal notranslate"><spanclass="pre">fill_between()</span></code><aclass="headerlink" href="#fill-between" title="Permalink to this headline">¶</a></h4>
<p>Passing scalars to parameter <em>where</em> in <codeclass="docutils literal notranslate"><spanclass="pre">fill_between()</span></code> and
<codeclass="docutils literal notranslate"><spanclass="pre">fill_betweenx()</span></code> is deprecated. While the documentation already states that
<em>where</em> must be of the same size as <em>x</em> (or <em>y</em>), scalars were accepted and
broadcasted to the size of <em>x</em>. Non-matching sizes will raise a <codeclass="docutils literal notranslate"><spanclass="pre">ValueError</span></code>
in the future.</p>
</div>
<divclass="section" id="tight-layout">
<h4><codeclass="docutils literal notranslate"><spanclass="pre">tight_layout()</span></code><aclass="headerlink" href="#tight-layout" title="Permalink to this headline">¶</a></h4>
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">renderer</span></code> parameter to <aclass="reference internal" href="_as_gen/matplotlib.figure.Figure.html#matplotlib.figure.Figure.tight_layout" title="matplotlib.figure.Figure.tight_layout"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Figure.tight_layout</span></code></a> is deprecated; this method
now always uses the renderer instance cached on the <aclass="reference internal" href="_as_gen/matplotlib.figure.Figure.html#matplotlib.figure.Figure" title="matplotlib.figure.Figure"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Figure</span></code></a>.</p>
</div>
<divclass="section" id="id2">
<h4>rcParams<aclass="headerlink" href="#id2" title="Permalink to this headline">¶</a></h4>
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">rcsetup.validate_animation_writer_path</span></code> function is deprecated.</p>
<p>Setting <codeclass="docutils literal notranslate"><aclass="reference external" href="../tutorials/introductory/customizing.html?highlight=savefig.format#a-sample-matplotlibrc-file"><spanclass="pre">rcParams["savefig.format"]</span></a></code> (default: 'png') to "auto" is deprecated; use its synonym "png" instead.</p>
<p>Setting <codeclass="docutils literal notranslate"><aclass="reference external" href="../tutorials/introductory/customizing.html?highlight=text.hinting#a-sample-matplotlibrc-file"><spanclass="pre">rcParams["text.hinting"]</span></a></code> (default: 'auto') to True or False is deprecated; use their synonyms
"auto" or "none" instead.</p>
<p><codeclass="docutils literal notranslate"><spanclass="pre">rcsetup.update_savefig_format</span></code> is deprecated.</p>
<p><codeclass="docutils literal notranslate"><spanclass="pre">rcsetup.validate_path_exists</span></code> is deprecated (use <codeclass="docutils literal notranslate"><spanclass="pre">os.path.exists</span></code> to check
whether a path exists).</p>
<p><codeclass="docutils literal notranslate"><spanclass="pre">rcsetup.ValidateInterval</span></code> is deprecated.</p>
</div>
<divclass="section" id="dates">
<h4>Dates<aclass="headerlink" href="#dates" title="Permalink to this headline">¶</a></h4>
<p><codeclass="docutils literal notranslate"><spanclass="pre">dates.mx2num</span></code> is deprecated.</p>
</div>
<divclass="section" id="tk">
<h4>TK<aclass="headerlink" href="#tk" title="Permalink to this headline">¶</a></h4>
<p><codeclass="docutils literal notranslate"><spanclass="pre">NavigationToolbar2Tk.set_active</span></code> is deprecated, as it has no (observable)
effect.</p>
</div>
<divclass="section" id="wx">
<h4>WX<aclass="headerlink" href="#wx" title="Permalink to this headline">¶</a></h4>
<p><codeclass="docutils literal notranslate"><spanclass="pre">FigureFrameWx.statusbar</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">NavigationToolbar2Wx.statbar</span></code> are deprecated.
The status bar can be retrieved by calling standard wx methods
(<codeclass="docutils literal notranslate"><spanclass="pre">frame.GetStatusBar()</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">toolbar.GetTopLevelParent().GetStatusBar()</span></code>).</p>
<p><codeclass="docutils literal notranslate"><spanclass="pre">backend_wx.ConfigureSubplotsWx.configure_subplots</span></code> and
<codeclass="docutils literal notranslate"><spanclass="pre">backend_wx.ConfigureSubplotsWx.get_canvas</span></code> are deprecated.</p>
</div>
<divclass="section" id="pgf">
<h4>PGF<aclass="headerlink" href="#pgf" title="Permalink to this headline">¶</a></h4>
<p><codeclass="docutils literal notranslate"><spanclass="pre">backend_pgf.repl_escapetext</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">backend_pgf.repl_mathdefault</span></code> are
deprecated.</p>
<p><codeclass="docutils literal notranslate"><spanclass="pre">RendererPgf.latexManager</span></code> is deprecated.</p>
</div>
<divclass="section" id="figurecanvas">
<h4>FigureCanvas<aclass="headerlink" href="#figurecanvas" title="Permalink to this headline">¶</a></h4>
<p><codeclass="docutils literal notranslate"><spanclass="pre">FigureCanvasBase.draw_cursor</span></code> (which has never done anything and has never
been overridden in any backend) is deprecated.</p>
<p><codeclass="docutils literal notranslate"><spanclass="pre">FigureCanvasMac.invalidate</span></code> is deprecated in favor of its synonym,
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">dryrun</span></code> parameter to the various <codeclass="docutils literal notranslate"><spanclass="pre">FigureCanvasFoo.print_foo</span></code> methods
is deprecated.</p>
</div>
<divclass="section" id="quiverkey-doc">
<h4>QuiverKey doc<aclass="headerlink" href="#quiverkey-doc" title="Permalink to this headline">¶</a></h4>
<p><codeclass="docutils literal notranslate"><spanclass="pre">quiver.QuiverKey.quiverkey_doc</span></code> is deprecated; use
<h4><aclass="reference internal" href="mlab_api.html#module-matplotlib.mlab" title="matplotlib.mlab"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">matplotlib.mlab</span></code></a><aclass="headerlink" href="#matplotlib-mlab" title="Permalink to this headline">¶</a></h4>
<p><codeclass="docutils literal notranslate"><spanclass="pre">mlab.apply_window</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">mlab.stride_repeat</span></code> are deprecated.</p>
</div>
<divclass="section" id="id3">
<h4>Fonts<aclass="headerlink" href="#id3" title="Permalink to this headline">¶</a></h4>
<p><codeclass="docutils literal notranslate"><spanclass="pre">font_manager.JSONEncoder</span></code> is deprecated. Use <aclass="reference internal" href="font_manager_api.html#matplotlib.font_manager.json_dump" title="matplotlib.font_manager.json_dump"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">font_manager.json_dump</span></code></a> to
methods of <codeclass="docutils literal notranslate"><spanclass="pre">matplotlib.ft2font.FT2Image</span></code> are deprecated. Convert the <codeclass="docutils literal notranslate"><spanclass="pre">FT2Image</span></code>
to a NumPy array with <codeclass="docutils literal notranslate"><spanclass="pre">np.asarray</span></code> before processing it.</p>
</div>
<divclass="section" id="colors">
<h4>Colors<aclass="headerlink" href="#colors" title="Permalink to this headline">¶</a></h4>
<p>The function <aclass="reference internal" href="_as_gen/matplotlib.colors.makeMappingArray.html#matplotlib.colors.makeMappingArray" title="matplotlib.colors.makeMappingArray"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">matplotlib.colors.makeMappingArray</span></code></a> is not considered part of
the public API any longer. Thus, it's deprecated.</p>
<p>Using a string of single-character colors as a color sequence (e.g. "rgb") is
deprecated. Use an explicit list instead.</p>
</div>
<divclass="section" id="scales">
<h4>Scales<aclass="headerlink" href="#scales" title="Permalink to this headline">¶</a></h4>
<p>Passing unsupported keyword arguments to <aclass="reference internal" href="scale_api.html#matplotlib.scale.ScaleBase" title="matplotlib.scale.ScaleBase"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">ScaleBase</span></code></a> and its subclasses
<aclass="reference internal" href="scale_api.html#matplotlib.scale.LinearScale" title="matplotlib.scale.LinearScale"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">LinearScale</span></code></a>, and <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">SymLogScale</span></code> is deprecated and will raise a <aclass="reference external" href="https://docs.python.org/3/library/exceptions.html#TypeError" title="(in Python v3.8)"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">TypeError</span></code></a> in 3.3.</p>
<p>If extra kwargs are passed to <aclass="reference internal" href="scale_api.html#matplotlib.scale.LogScale" title="matplotlib.scale.LogScale"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">LogScale</span></code></a>, <aclass="reference external" href="https://docs.python.org/3/library/exceptions.html#TypeError" title="(in Python v3.8)"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">TypeError</span></code></a> will now be
<p>Support in <aclass="reference internal" href="testing_api.html#module-matplotlib.testing" title="matplotlib.testing"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">matplotlib.testing</span></code></a> for nose-based tests is deprecated (a
deprecation is emitted if using e.g. the decorators from that module while
both 1) matplotlib's conftests have not been called and 2) nose is in
<p><codeclass="docutils literal notranslate"><spanclass="pre">testing.is_called_from_pytest</span></code> is deprecated.</p>
<p>During the deprecation period, to force the generation of nose base tests,
import nose first.</p>
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">switch_backend_warn</span></code> parameter to <codeclass="docutils literal notranslate"><spanclass="pre">matplotlib.test</span></code> has no effect and
is deprecated.</p>
<p><codeclass="docutils literal notranslate"><spanclass="pre">testing.jpl_units.UnitDbl.UnitDbl.checkUnits</span></code> is deprecated.</p>
<h4><codeclass="docutils literal notranslate"><spanclass="pre">DivergingNorm</span></code> renamed to <codeclass="docutils literal notranslate"><spanclass="pre">TwoSlopeNorm</span></code><aclass="headerlink" href="#divergingnorm-renamed-to-twoslopenorm" title="Permalink to this headline">¶</a></h4>
<p><codeclass="docutils literal notranslate"><spanclass="pre">DivergingNorm</span></code> was a misleading name; although the norm was
developed with the idea that it would likely be used with diverging
colormaps, the word 'diverging' does not describe or evoke the norm's
mapping function. Since that function is monotonic, continuous, and
piece-wise linear with two segments, the norm has been renamed to
<h4>Misc<aclass="headerlink" href="#misc" title="Permalink to this headline">¶</a></h4>
<p><codeclass="docutils literal notranslate"><spanclass="pre">matplotlib.get_home</span></code> is deprecated (use e.g. <codeclass="docutils literal notranslate"><spanclass="pre">os.path.expanduser("~")</span></code>)
instead.</p>
<p><codeclass="docutils literal notranslate"><spanclass="pre">matplotlib.compare_versions</span></code> is deprecated (use comparison of
<p><codeclass="docutils literal notranslate"><spanclass="pre">style.core.is_style_file</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">style.core.iter_style_files</span></code>
are deprecated.</p>
</div>
</div>
<divclass="section" id="removals">
<h3><aclass="toc-backref" href="#id7">Removals</a><aclass="headerlink" href="#removals" title="Permalink to this headline">¶</a></h3>
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">matplotlib.testing.determinism</span></code> module, which exposes no public API, has
been deleted.</p>
<p>The following API elements have been removed:</p>
<li>passing <codeclass="docutils literal notranslate"><spanclass="pre">(verts,</span><spanclass="pre">0)</span></code> or <codeclass="docutils literal notranslate"><spanclass="pre">(...,</span><spanclass="pre">3)</span></code> when specifying a marker to specify a
path or a circle, respectively (instead, use <codeclass="docutils literal notranslate"><spanclass="pre">verts</span></code> or <codeclass="docutils literal notranslate"><spanclass="pre">"o"</span></code>,
<p>The following members of <codeclass="docutils literal notranslate"><spanclass="pre">matplotlib.backends.backend_pdf.PdfFile</span></code> were removed:</p>
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">required_interactive_framework</span></code> attribute of backend modules introduced
in Matplotlib 3.0 has been moved to the <codeclass="docutils literal notranslate"><spanclass="pre">FigureCanvas</span></code> class, in order to
let it be inherited by third-party canvas subclasses and to make it easier to
know what interactive framework is required by a canvas class.</p>
<p><codeclass="docutils literal notranslate"><spanclass="pre">backend_qt4.FigureCanvasQT5</span></code>, which is an alias for
<codeclass="docutils literal notranslate"><spanclass="pre">backend_qt5.FigureCanvasQT</span></code> (but only exists under that name in
<codeclass="docutils literal notranslate"><spanclass="pre">backend_qt4</span></code>), has been removed.</p>
</div>
<divclass="section" id="development-changes">
<h3><aclass="toc-backref" href="#id8">Development changes</a><aclass="headerlink" href="#development-changes" title="Permalink to this headline">¶</a></h3>
<divclass="section" id="windows-build">
<h4>Windows build<aclass="headerlink" href="#windows-build" title="Permalink to this headline">¶</a></h4>
<p>Previously, when building the <codeclass="xref py py-mod docutils literal notranslate"><spanclass="pre">matplotlib._png</span></code> extension, the build
script would add "png" and "z" to the extensions <codeclass="docutils literal notranslate"><spanclass="pre">.libraries</span></code> attribute (if
pkg-config information is not available, which is in particular the case on
Windows).</p>
<p>In particular, this implies that the Windows build would look up files named
<codeclass="docutils literal notranslate"><spanclass="pre">png.lib</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">z.lib</span></code>; but neither libpng upstream nor zlib upstream
provides these files by default. (On Linux, this would look up <codeclass="docutils literal notranslate"><spanclass="pre">libpng.so</span></code>
and <codeclass="docutils literal notranslate"><spanclass="pre">libz.so</span></code>, which are indeed standard names.)</p>
<p>Instead, on Windows, we now look up <codeclass="docutils literal notranslate"><spanclass="pre">libpng16.lib</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">zlib.lib</span></code>, which
<em>are</em> the upstream names for the shared libraries (as of libpng 1.6.x).</p>
<p>For a statically-linked build, the upstream names are <codeclass="docutils literal notranslate"><spanclass="pre">libpng16_static.lib</span></code>
and <codeclass="docutils literal notranslate"><spanclass="pre">zlibstatic.lib</span></code>; one still needs to manually rename them if such a build
is desired.</p>
</div>
<divclass="section" id="packaging-dlls">
<h4>Packaging DLLs<aclass="headerlink" href="#packaging-dlls" title="Permalink to this headline">¶</a></h4>
<p>Previously, it was possible to package Windows DLLs into the Maptlotlib
wheel (or sdist) by copying them into the source tree and setting the
<codeclass="docutils literal notranslate"><spanclass="pre">package_data.dlls</span></code> entry in <codeclass="docutils literal notranslate"><spanclass="pre">setup.cfg</span></code>.</p>
<p>DLLs copied in the source tree are now always packaged; the
<codeclass="docutils literal notranslate"><spanclass="pre">package_data.dlls</span></code> entry has no effect anymore. If you do not want to
include the DLLs, don't copy them into the source tree.</p>