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
<h1>API Changes<aclass="headerlink" href="#api-changes" title="Permalink to this headline">¶</a></h1>
<p>This chapter is a log of changes to matplotlib that affect the
outward-facing API. If updating matplotlib breaks your scripts, this
list may help describe what changes may be necessary in your code or
help figure out possible sources of the changes you are experiencing.</p>
<p>For new features that were added to matplotlib, please see
<aclass="reference internal" href="../users/whats_new.html#whats-new"><em>What’s new in matplotlib</em></a>.</p>
<divclass="section" id="changes-in-1-3-x">
<h2>Changes in 1.3.x<aclass="headerlink" href="#changes-in-1-3-x" title="Permalink to this headline">¶</a></h2>
<ulclass="simple">
<li>Fixed a bug in setting the position for the right/top spine with data
position type. Previously, it would draw the right or top spine at
+1 data offset.</li>
<li>In <aclass="reference internal" href="artist_api.html#matplotlib.patches.FancyArrow" title="matplotlib.patches.FancyArrow"><ttclass="xref py py-class docutils literal"><spanclass="pre">FancyArrow</span></tt></a>, the default arrow head width,
<ttclass="docutils literal"><spanclass="pre">head_width</span></tt>, has been made larger to produce a visible arrow head. The new
value of this kwarg is <ttclass="docutils literal"><spanclass="pre">head_width</span><spanclass="pre">=</span><spanclass="pre">20</span><spanclass="pre">*</span><spanclass="pre">width</span></tt>.</li>
<li>Removed call of <aclass="reference internal" href="axes_api.html#matplotlib.axes.Axes.grid" title="matplotlib.axes.Axes.grid"><ttclass="xref py py-meth docutils literal"><spanclass="pre">grid()</span></tt></a> in
<aclass="reference internal" href="pyplot_api.html#matplotlib.pyplot.plotfile" title="matplotlib.pyplot.plotfile"><ttclass="xref py py-meth docutils literal"><spanclass="pre">plotfile()</span></tt></a>. To draw the axes grid, set to <em>True</em>
matplotlib.rcParams[‘axes.grid’] or <ttclass="docutils literal"><spanclass="pre">axes.grid</span></tt> in <ttclass="docutils literal"><spanclass="pre">.matplotlibrc</span></tt> or
<li>A new keyword <em>extendrect</em> in <aclass="reference internal" href="pyplot_api.html#matplotlib.pyplot.colorbar" title="matplotlib.pyplot.colorbar"><ttclass="xref py py-meth docutils literal"><spanclass="pre">colorbar()</span></tt></a> and
<aclass="reference internal" href="colorbar_api.html#matplotlib.colorbar.ColorbarBase" title="matplotlib.colorbar.ColorbarBase"><ttclass="xref py py-class docutils literal"><spanclass="pre">ColorbarBase</span></tt></a> allows one to control the shape
of colorbar extensions.</li>
<li>The <ttclass="xref py py-obj docutils literal"><spanclass="pre">mpl</span></tt> module is now deprecated. Those who relied on this
module should transition to simply using <ttclass="xref py py-obj docutils literal"><spanclass="pre">import</span><spanclass="pre">matplotlib</span><spanclass="pre">as</span><spanclass="pre">mpl</span></tt>.</li>
<li>The extension of <aclass="reference internal" href="widgets_api.html#matplotlib.widgets.MultiCursor" title="matplotlib.widgets.MultiCursor"><ttclass="xref py py-class docutils literal"><spanclass="pre">MultiCursor</span></tt></a> to both vertical
(default) and/or horizontal cursor implied that <ttclass="docutils literal"><spanclass="pre">self.line</span></tt> is replaced
by <ttclass="docutils literal"><spanclass="pre">self.vline</span></tt> for vertical cursors lines and <ttclass="docutils literal"><spanclass="pre">self.hline</span></tt> is added
for the horizontal cursors lines.</li>
<li>On POSIX platforms, the <aclass="reference internal" href="cbook_api.html#matplotlib.cbook.report_memory" title="matplotlib.cbook.report_memory"><ttclass="xref py py-func docutils literal"><spanclass="pre">report_memory()</span></tt></a> function
raises <ttclass="xref py py-class docutils literal"><spanclass="pre">NotImplementedError</span></tt> instead of <ttclass="xref py py-class docutils literal"><spanclass="pre">OSError</span></tt> if the
<strongclass="command">ps</strong> command cannot be run.</li>
<li>The <ttclass="xref py py-func docutils literal"><spanclass="pre">check_output()</span></tt> function has been moved to
<li><aclass="reference internal" href="artist_api.html#matplotlib.patches.Patch" title="matplotlib.patches.Patch"><ttclass="xref py py-class docutils literal"><spanclass="pre">Patch</span></tt></a> now fully supports using RGBA values for
its <ttclass="docutils literal"><spanclass="pre">facecolor</span></tt> and <ttclass="docutils literal"><spanclass="pre">edgecolor</span></tt> attributes, which enables faces and
edges to have different alpha values. If the
<aclass="reference internal" href="artist_api.html#matplotlib.patches.Patch" title="matplotlib.patches.Patch"><ttclass="xref py py-class docutils literal"><spanclass="pre">Patch</span></tt></a> object’s <ttclass="docutils literal"><spanclass="pre">alpha</span></tt> attribute is set to
anything other than <ttclass="docutils literal"><spanclass="pre">None</span></tt>, that value will override any alpha-channel
value in both the face and edge colors. Previously, if
<aclass="reference internal" href="artist_api.html#matplotlib.patches.Patch" title="matplotlib.patches.Patch"><ttclass="xref py py-class docutils literal"><spanclass="pre">Patch</span></tt></a> had <ttclass="docutils literal"><spanclass="pre">alpha=None</span></tt>, the alpha component
of <ttclass="docutils literal"><spanclass="pre">edgecolor</span></tt> would be applied to both the edge and face.</li>
<li>The optional <ttclass="docutils literal"><spanclass="pre">isRGB</span></tt> argument to
the other GraphicsContext classes that descend from it) has been renamed to
<ttclass="docutils literal"><spanclass="pre">isRGBA</span></tt>, and should now only be set to <ttclass="docutils literal"><spanclass="pre">True</span></tt> if the <ttclass="docutils literal"><spanclass="pre">fg</span></tt> color
argument is known to be an RGBA tuple.</li>
<li>For <aclass="reference internal" href="artist_api.html#matplotlib.patches.Patch" title="matplotlib.patches.Patch"><ttclass="xref py py-class docutils literal"><spanclass="pre">Patch</span></tt></a>, the <ttclass="docutils literal"><spanclass="pre">capstyle</span></tt> used is now
<ttclass="docutils literal"><spanclass="pre">butt</span></tt>, to be consistent with the default for most other objects, and to
avoid problems with non-solid <ttclass="docutils literal"><spanclass="pre">linestyle</span></tt> appearing solid when using a
large <ttclass="docutils literal"><spanclass="pre">linewidth</span></tt>. Previously, <aclass="reference internal" href="artist_api.html#matplotlib.patches.Patch" title="matplotlib.patches.Patch"><ttclass="xref py py-class docutils literal"><spanclass="pre">Patch</span></tt></a> used
<h2>Changes in 1.2.x<aclass="headerlink" href="#changes-in-1-2-x" title="Permalink to this headline">¶</a></h2>
<ul>
<li><pclass="first">The <ttclass="docutils literal"><spanclass="pre">classic</span></tt> option of the rc parameter <ttclass="docutils literal"><spanclass="pre">toolbar</span></tt> is deprecated
and will be removed in the next release.</p>
</li>
<li><pclass="first">The <ttclass="xref py py-meth docutils literal"><spanclass="pre">isvector()</span></tt> method has been removed since it
is no longer functional.</p>
</li>
<li><pclass="first">The <ttclass="xref py py-obj docutils literal"><spanclass="pre">rasterization_zorder</span></tt> property on <aclass="reference internal" href="axes_api.html#matplotlib.axes.Axes" title="matplotlib.axes.Axes"><ttclass="xref py py-obj docutils literal"><spanclass="pre">Axes</span></tt></a> a
zorder below which artists are rasterized. This has defaulted to
-30000.0, but it now defaults to <ttclass="xref py py-obj docutils literal"><spanclass="pre">None</span></tt>, meaning no artists will be
rasterized. In order to rasterize artists below a given zorder
value, <ttclass="xref py py-obj docutils literal"><spanclass="pre">set_rasterization_zorder</span></tt> must be explicitly called.</p>
when specifying a marker using a tuple, the angle is now specified
in degrees, not radians.</p>
</li>
<li><pclass="first">Using <aclass="reference internal" href="axes_api.html#matplotlib.axes.Axes.twinx" title="matplotlib.axes.Axes.twinx"><ttclass="xref py py-meth docutils literal"><spanclass="pre">twinx()</span></tt></a> or
<aclass="reference internal" href="axes_api.html#matplotlib.axes.Axes.twiny" title="matplotlib.axes.Axes.twiny"><ttclass="xref py py-meth docutils literal"><spanclass="pre">twiny()</span></tt></a> no longer overrides the current locaters
and formatters on the axes.</p>
</li>
<li><pclass="first">In <aclass="reference internal" href="axes_api.html#matplotlib.axes.Axes.contourf" title="matplotlib.axes.Axes.contourf"><ttclass="xref py py-meth docutils literal"><spanclass="pre">contourf()</span></tt></a>, the handling of the <em>extend</em>
kwarg has changed. Formerly, the extended ranges were mapped
after to 0, 1 after being normed, so that they always corresponded
to the extreme values of the colormap. Now they are mapped
outside this range so that they correspond to the special
colormap values determined by the
<aclass="reference internal" href="colors_api.html#matplotlib.colors.Colormap.set_under" title="matplotlib.colors.Colormap.set_under"><ttclass="xref py py-meth docutils literal"><spanclass="pre">set_under()</span></tt></a> and
<aclass="reference internal" href="colors_api.html#matplotlib.colors.Colormap.set_over" title="matplotlib.colors.Colormap.set_over"><ttclass="xref py py-meth docutils literal"><spanclass="pre">set_over()</span></tt></a> methods, which
default to the colormap end points.</p>
</li>
<li><pclass="first">The new rc parameter <ttclass="docutils literal"><spanclass="pre">savefig.format</span></tt> replaces <ttclass="docutils literal"><spanclass="pre">cairo.format</span></tt> and
<ttclass="docutils literal"><spanclass="pre">savefig.extension</span></tt>, and sets the default file format used by
<li><pclass="first">In <aclass="reference internal" href="pyplot_api.html#matplotlib.pyplot.pie" title="matplotlib.pyplot.pie"><ttclass="xref py py-meth docutils literal"><spanclass="pre">pie()</span></tt></a> and <ttclass="xref py py-meth docutils literal"><spanclass="pre">pie()</span></tt>, one can
now set the radius of the pie; setting the <em>radius</em> to ‘None’ (the default
value), will result in a pie with a radius of 1 as before.</p>
</li>
<li><pclass="first">Use of <aclass="reference internal" href="../devel/add_new_projection.html#matplotlib.projections.projection_factory" title="matplotlib.projections.projection_factory"><ttclass="xref py py-func docutils literal"><spanclass="pre">projection_factory()</span></tt></a> is now deprecated
in favour of axes class identification using
<aclass="reference internal" href="../devel/add_new_projection.html#matplotlib.projections.process_projection_requirements" title="matplotlib.projections.process_projection_requirements"><ttclass="xref py py-func docutils literal"><spanclass="pre">process_projection_requirements()</span></tt></a> followed by
direct axes class invocation (at the time of writing, functions which do this
<spanclass="k">raise</span><spanclass="ne">ValueError</span><spanclass="p">(</span><spanclass="s">'polar and projection args are inconsistent'</span><spanclass="p">)</span>
<p>This change means that third party objects can expose themselves as
matplotlib axes by providing a <ttclass="docutils literal"><spanclass="pre">_as_mpl_axes</span></tt> method. See
<aclass="reference internal" href="../devel/add_new_projection.html#adding-new-scales"><em>Adding new scales and projections to matplotlib</em></a> for more detail.</p>
</li>
<li><pclass="first">A new keyword <em>extendfrac</em> in <aclass="reference internal" href="pyplot_api.html#matplotlib.pyplot.colorbar" title="matplotlib.pyplot.colorbar"><ttclass="xref py py-meth docutils literal"><spanclass="pre">colorbar()</span></tt></a> and
<aclass="reference internal" href="colorbar_api.html#matplotlib.colorbar.ColorbarBase" title="matplotlib.colorbar.ColorbarBase"><ttclass="xref py py-class docutils literal"><spanclass="pre">ColorbarBase</span></tt></a> allows one to control the size of
the triangular minimum and maximum extensions on colorbars.</p>
</li>
<li><pclass="first">A new keyword <em>capthick</em> in <aclass="reference internal" href="pyplot_api.html#matplotlib.pyplot.errorbar" title="matplotlib.pyplot.errorbar"><ttclass="xref py py-meth docutils literal"><spanclass="pre">errorbar()</span></tt></a> has been
added as an intuitive alias to the <em>markeredgewidth</em> and <em>mew</em> keyword
arguments, which indirectly controlled the thickness of the caps on
the errorbars. For backwards compatibility, specifying either of the
original keyword arguments will override any value provided by
<em>capthick</em>.</p>
</li>
<li><pclass="first">Transform subclassing behaviour is now subtly changed. If your transform
implements a non-affine transformation, then it should override the
<ttclass="docutils literal"><spanclass="pre">transform_non_affine</span></tt> method, rather than the generic <ttclass="docutils literal"><spanclass="pre">transform</span></tt> method.
Previously transforms would define <ttclass="docutils literal"><spanclass="pre">transform</span></tt> and then copy the
method into <ttclass="docutils literal"><spanclass="pre">transform_non_affine</span></tt>:</p>
<li><pclass="first">Artists no longer have <ttclass="docutils literal"><spanclass="pre">x_isdata</span></tt> or <ttclass="docutils literal"><spanclass="pre">y_isdata</span></tt> attributes; instead
any artist’s transform can be interrogated with
<p>for versions before 1.2 this could only be achieved in a sub-optimal way,
using <ttclass="docutils literal"><spanclass="pre">ax.transData</span><spanclass="pre">+</span><spanclass="pre">ax.transAxes.inverted()</span></tt> (depth is a new concept,
but had it existed it would return 4 for this example).</p>
</li>
<li><pclass="first"><ttclass="docutils literal"><spanclass="pre">twinx</span></tt> and <ttclass="docutils literal"><spanclass="pre">twiny</span></tt> now returns an instance of SubplotBase if
parent axes is an instance of SubplotBase.</p>
</li>
<li><pclass="first">All Qt3-based backends are now deprecated due to the lack of py3k bindings.
Qt and QtAgg backends will continue to work in v1.2.x for py2.6
and py2.7. It is anticipated that the Qt3 support will be completely
will now always mean that the nearest-neighbor interpolation is performed.
If you want the no-op interpolation to be performed, choose ‘none’.</li>
<li>There were errors in how the tri-functions were handling input parameters
that had to be fixed. If your tri-plots are not working correctly anymore,
or you were working around apparent mistakes, please see issue #203 in the
github tracker. When in doubt, use kwargs.</li>
<li>The ‘symlog’ scale had some bad behavior in previous versions. This has now
been fixed and users should now be able to use it without frustrations.
The fixes did result in some minor changes in appearance for some users who
may have been depending on the bad behavior.</li>
<li>There is now a common set of markers for all plotting functions. Previously,
some markers existed only for <aclass="reference internal" href="pyplot_api.html#matplotlib.pyplot.scatter" title="matplotlib.pyplot.scatter"><ttclass="xref py py-meth docutils literal"><spanclass="pre">scatter()</span></tt></a> or just for
<aclass="reference internal" href="pyplot_api.html#matplotlib.pyplot.plot" title="matplotlib.pyplot.plot"><ttclass="xref py py-meth docutils literal"><spanclass="pre">plot()</span></tt></a>. This is now no longer the case. This merge
did result in a conflict. The string ‘d’ now means “thin diamond” while
‘D’ will mean “regular diamond”.</li>
</ul>
</div>
<divclass="section" id="changes-beyond-0-99-x">
<h2>Changes beyond 0.99.x<aclass="headerlink" href="#changes-beyond-0-99-x" title="Permalink to this headline">¶</a></h2>
a sequence of color specs to match a sequence of datasets.</li>
<li>The <aclass="reference internal" href="collections_api.html#matplotlib.collections.EllipseCollection" title="matplotlib.collections.EllipseCollection"><ttclass="xref py py-class docutils literal"><spanclass="pre">EllipseCollection</span></tt></a> has been
changed in two ways:<ul>
<li>There is a new <em>units</em> option, ‘xy’, that scales the ellipse with
the data units. This matches the :class:’~matplotlib.patches.Ellipse`
scaling.</li>
<li>The <em>height</em> and <em>width</em> kwargs have been changed to specify
the height and width, again for consistency with
<aclass="reference internal" href="artist_api.html#matplotlib.patches.Ellipse" title="matplotlib.patches.Ellipse"><ttclass="xref py py-class docutils literal"><spanclass="pre">Ellipse</span></tt></a>, and to better match
their names; previously they specified the half-height and
half-width.</li>
</ul>
</li>
<li>There is a new rc parameter <ttclass="docutils literal"><spanclass="pre">axes.color_cycle</span></tt>, and the color
cycle is now independent of the rc parameter <ttclass="docutils literal"><spanclass="pre">lines.color</span></tt>.
<ttclass="xref py py-func docutils literal"><spanclass="pre">matplotlib.Axes.set_default_color_cycle()</span></tt> is deprecated.</li>
<li>You can now print several figures to one pdf file and modify the
document information dictionary of a pdf file. See the docstrings
of the class <aclass="reference internal" href="backend_pdf_api.html#matplotlib.backends.backend_pdf.PdfPages" title="matplotlib.backends.backend_pdf.PdfPages"><ttclass="xref py py-class docutils literal"><spanclass="pre">matplotlib.backends.backend_pdf.PdfPages</span></tt></a> for
more information.</li>
<li>Removed <aclass="reference external" href="http://www.voidspace.org.uk/python/configobj.html">configobj</a> and <aclass="reference external" href="http://code.enthought.com/projects/traits">enthought.traits</a> packages, which are only
required by the experimental traited config and are somewhat out of
date. If needed, install them independently.</li>
</ul>
<ul>
<li><pclass="first">The new rc parameter <ttclass="docutils literal"><spanclass="pre">savefig.extension</span></tt> sets the filename extension
that is used by <aclass="reference internal" href="figure_api.html#matplotlib.figure.Figure.savefig" title="matplotlib.figure.Figure.savefig"><ttclass="xref py py-meth docutils literal"><spanclass="pre">matplotlib.figure.Figure.savefig()</span></tt></a> if its <em>fname</em>
argument lacks an extension.</p>
</li>
<li><pclass="first">In an effort to simplify the backend API, all clipping rectangles
and paths are now passed in using GraphicsContext objects, even
<li><aclass="reference internal" href="axes_api.html#matplotlib.axes.Axes.tripcolor" title="matplotlib.axes.Axes.tripcolor"><ttclass="xref py py-meth docutils literal"><spanclass="pre">matplotlib.axes.Axes.tripcolor()</span></tt></a> draws a pseudocolor
plot on a triangular grid.</li>
<li><aclass="reference internal" href="axes_api.html#matplotlib.axes.Axes.triplot" title="matplotlib.axes.Axes.triplot"><ttclass="xref py py-meth docutils literal"><spanclass="pre">matplotlib.axes.Axes.triplot()</span></tt></a> draws a triangular grid
as lines and/or markers.</li>
</ul>
</li>
</ul>
</div>
<divclass="section" id="changes-in-0-99">
<h2>Changes in 0.99<aclass="headerlink" href="#changes-in-0-99" title="Permalink to this headline">¶</a></h2>
<ulclass="simple">
<li>pylab no longer provides a load and save function. These are
available in matplotlib.mlab, or you can use numpy.loadtxt and
numpy.savetxt for text files, or np.save and np.load for binary
numpy arrays.</li>
<li>User-generated colormaps can now be added to the set recognized
by <aclass="reference internal" href="cm_api.html#matplotlib.cm.get_cmap" title="matplotlib.cm.get_cmap"><ttclass="xref py py-func docutils literal"><spanclass="pre">matplotlib.cm.get_cmap()</span></tt></a>. Colormaps can be made the
<li><pclass="first">Remove support for pyExcelerator in exceltools – use xlwt
instead</p>
</li>
<li><pclass="first">Changed the defaults of acorr and xcorr to use usevlines=True,
maxlags=10 and normed=True since these are the best defaults</p>
</li>
<li><pclass="first">Following keyword parameters for <ttclass="xref py py-class docutils literal"><spanclass="pre">matplotlib.label.Label</span></tt> are now
deprecated and new set of parameters are introduced. The new parameters
are given as a fraction of the font-size. Also, <em>scatteryoffsets</em>,
<em>fancybox</em> and <em>columnspacing</em> are added as keyword parameters.</p>
<aclass="reference internal" href="axes_api.html#matplotlib.axes.Axes.set_ylim" title="matplotlib.axes.Axes.set_ylim"><ttclass="xref py py-meth docutils literal"><spanclass="pre">matplotlib.axes.Axes.set_ylim()</span></tt></a> now return a copy of the
<ttclass="xref py py-attr docutils literal"><spanclass="pre">viewlim</span></tt> array to avoid modify-in-place surprises.</p>
</li>
<li><pclass="first"><aclass="reference internal" href="afm_api.html#matplotlib.afm.AFM.get_fullname" title="matplotlib.afm.AFM.get_fullname"><ttclass="xref py py-meth docutils literal"><spanclass="pre">matplotlib.afm.AFM.get_fullname()</span></tt></a> and
<aclass="reference internal" href="afm_api.html#matplotlib.afm.AFM.get_familyname" title="matplotlib.afm.AFM.get_familyname"><ttclass="xref py py-meth docutils literal"><spanclass="pre">matplotlib.afm.AFM.get_familyname()</span></tt></a> no longer raise an
exception if the AFM file does not specify these optional
attributes, but returns a guess based on the required FontName
attribute.</p>
</li>
<li><pclass="first">Changed precision kwarg in <aclass="reference internal" href="pyplot_api.html#matplotlib.pyplot.spy" title="matplotlib.pyplot.spy"><ttclass="xref py py-func docutils literal"><spanclass="pre">matplotlib.pyplot.spy()</span></tt></a>; default is
0, and the string value ‘present’ is used for sparse arrays only to
<li><pclass="first">Added <ttclass="docutils literal"><spanclass="pre">angles</span></tt> kwarg to <aclass="reference internal" href="pyplot_api.html#matplotlib.pyplot.quiver" title="matplotlib.pyplot.quiver"><ttclass="xref py py-func docutils literal"><spanclass="pre">matplotlib.pyplot.quiver()</span></tt></a> for more
flexible specification of the arrow angles.</p>
</li>
<li><pclass="first">Deprecated (raise NotImplementedError) all the mlab2 functions from
<aclass="reference internal" href="mlab_api.html#module-matplotlib.mlab" title="matplotlib.mlab"><ttclass="xref py py-mod docutils literal"><spanclass="pre">matplotlib.mlab</span></tt></a> out of concern that some of them were not
clean room implementations.</p>
</li>
<li><pclass="first">Methods <aclass="reference internal" href="collections_api.html#matplotlib.collections.Collection.get_offsets" title="matplotlib.collections.Collection.get_offsets"><ttclass="xref py py-meth docutils literal"><spanclass="pre">matplotlib.collections.Collection.get_offsets()</span></tt></a> and
<aclass="reference internal" href="collections_api.html#matplotlib.collections.Collection.set_offsets" title="matplotlib.collections.Collection.set_offsets"><ttclass="xref py py-meth docutils literal"><spanclass="pre">matplotlib.collections.Collection.set_offsets()</span></tt></a> added to
<aclass="reference internal" href="collections_api.html#matplotlib.collections.Collection" title="matplotlib.collections.Collection"><ttclass="xref py py-class docutils literal"><spanclass="pre">Collection</span></tt></a> base class.</p>
<aclass="reference internal" href="axes_api.html#matplotlib.axes.Axes.get_frame" title="matplotlib.axes.Axes.get_frame"><ttclass="xref py py-meth docutils literal"><spanclass="pre">matplotlib.axes.Axes.get_frame()</span></tt></a>, which returns
<ttclass="xref py py-attr docutils literal"><spanclass="pre">matplotlib.axes.Axes.patch</span></tt>, is deprecated.</p>
</li>
<li><pclass="first">Changes in the <ttclass="xref py py-class docutils literal"><spanclass="pre">matplotlib.contour.ContourLabeler</span></tt> attributes
(<aclass="reference internal" href="pyplot_api.html#matplotlib.pyplot.clabel" title="matplotlib.pyplot.clabel"><ttclass="xref py py-func docutils literal"><spanclass="pre">matplotlib.pyplot.clabel()</span></tt></a> function) so that they all have a
form like <ttclass="docutils literal"><spanclass="pre">.labelAttribute</span></tt>. The three attributes that are most
likely to be used by end users, <ttclass="docutils literal"><spanclass="pre">.cl</span></tt>, <ttclass="docutils literal"><spanclass="pre">.cl_xy</span></tt> and
<ttclass="docutils literal"><spanclass="pre">.cl_cvalues</span></tt> have been maintained for the moment (in addition to
their renamed versions), but they are deprecated and will eventually
be removed.</p>
</li>
<li><pclass="first">Moved several functions in <aclass="reference internal" href="mlab_api.html#module-matplotlib.mlab" title="matplotlib.mlab"><ttclass="xref py py-mod docutils literal"><spanclass="pre">matplotlib.mlab</span></tt></a> and
<aclass="reference internal" href="cbook_api.html#module-matplotlib.cbook" title="matplotlib.cbook"><ttclass="xref py py-mod docutils literal"><spanclass="pre">matplotlib.cbook</span></tt></a> into a separate module
<ttclass="xref py py-mod docutils literal"><spanclass="pre">matplotlib.numerical_methods</span></tt> because they were unrelated to
the initial purpose of mlab or cbook and appeared more coherent
elsewhere.</p>
</li>
</ul>
</div>
<divclass="section" id="changes-for-0-98-1">
<h2>Changes for 0.98.1<aclass="headerlink" href="#changes-for-0-98-1" title="Permalink to this headline">¶</a></h2>
<ulclass="simple">
<li>Removed broken <ttclass="xref py py-mod docutils literal"><spanclass="pre">matplotlib.axes3d</span></tt> support and replaced it with
a non-implemented error pointing to 0.91.x</li>
</ul>
</div>
<divclass="section" id="changes-for-0-98-0">
<h2>Changes for 0.98.0<aclass="headerlink" href="#changes-for-0-98-0" title="Permalink to this headline">¶</a></h2>
<ulclass="simple">
<li><ttclass="xref py py-func docutils literal"><spanclass="pre">matplotlib.image.imread()</span></tt> now no longer always returns RGBA data—if
the image is luminance or RGB, it will return a MxN or MxNx3 array
if possible. Also uint8 is no longer always forced to float.</li>
infrastructure to use <aclass="reference internal" href="cbook_api.html#matplotlib.cbook.CallbackRegistry" title="matplotlib.cbook.CallbackRegistry"><ttclass="xref py py-class docutils literal"><spanclass="pre">matplotlib.cbook.CallbackRegistry</span></tt></a>
rather than custom callback handling. Any users of
<ttclass="xref py py-meth docutils literal"><spanclass="pre">matplotlib.cm.ScalarMappable.add_observer()</span></tt> of the
<aclass="reference internal" href="cm_api.html#matplotlib.cm.ScalarMappable" title="matplotlib.cm.ScalarMappable"><ttclass="xref py py-class docutils literal"><spanclass="pre">ScalarMappable</span></tt></a> should use the
<li>matplotlib now requires Python 2.4, so <aclass="reference internal" href="cbook_api.html#module-matplotlib.cbook" title="matplotlib.cbook"><ttclass="xref py py-mod docutils literal"><spanclass="pre">matplotlib.cbook</span></tt></a> will
no longer provide <ttclass="xref py py-class docutils literal"><spanclass="pre">set</span></tt>, <ttclass="xref py py-func docutils literal"><spanclass="pre">enumerate()</span></tt>, <ttclass="xref py py-func docutils literal"><spanclass="pre">reversed()</span></tt>
or <ttclass="xref py py-func docutils literal"><spanclass="pre">izip()</span></tt> compatibility functions.</li>
<li>In Numpy 1.0, bins are specified by the left edges only. The axes
semantics for histograms. Providing <ttclass="docutils literal"><spanclass="pre">binedges</span></tt>, the last value gives
the upper-right edge now, which was implicitly set to +infinity in
Numpy 1.0. This also means that the last bin doesn’t contain upper
outliers any more by default.</li>
<li>New axes method and pyplot function,
<aclass="reference internal" href="pyplot_api.html#matplotlib.pyplot.hexbin" title="matplotlib.pyplot.hexbin"><ttclass="xref py py-func docutils literal"><spanclass="pre">hexbin()</span></tt></a>, is an alternative to
<aclass="reference internal" href="pyplot_api.html#matplotlib.pyplot.scatter" title="matplotlib.pyplot.scatter"><ttclass="xref py py-func docutils literal"><spanclass="pre">scatter()</span></tt></a> for large datasets. It makes
something like a <aclass="reference internal" href="pyplot_api.html#matplotlib.pyplot.pcolor" title="matplotlib.pyplot.pcolor"><ttclass="xref py py-func docutils literal"><spanclass="pre">pcolor()</span></tt></a> of a 2-D
allows one require an axis to be centered around zero.</li>
<li>Toolkits must now be imported from <ttclass="docutils literal"><spanclass="pre">mpl_toolkits</span></tt> (not <ttclass="docutils literal"><spanclass="pre">matplotlib.toolkits</span></tt>)</li>
<h3>Notes about the transforms refactoring<aclass="headerlink" href="#notes-about-the-transforms-refactoring" title="Permalink to this headline">¶</a></h3>
<p>A major new feature of the 0.98 series is a more flexible and
extensible transformation infrastructure, written in Python/Numpy
rather than a custom C extension.</p>
<p>The primary goal of this refactoring was to make it easier to
extend matplotlib to support new kinds of projections. This is
mostly an internal improvement, and the possible user-visible
changes it allows are yet to come.</p>
<p>See <aclass="reference internal" href="../devel/transformations.html#module-matplotlib.transforms" title="matplotlib.transforms"><ttclass="xref py py-mod docutils literal"><spanclass="pre">matplotlib.transforms</span></tt></a> for a description of the design of
the new transformation framework.</p>
<p>For efficiency, many of these functions return views into Numpy
arrays. This means that if you hold on to a reference to them,
their contents may change. If you want to store a snapshot of
their current values, use the Numpy array method copy().</p>
<p>The view intervals are now stored only in one place – in the
<aclass="reference internal" href="axes_api.html#matplotlib.axes.Axes" title="matplotlib.axes.Axes"><ttclass="xref py py-class docutils literal"><spanclass="pre">matplotlib.axes.Axes</span></tt></a> instance, not in the locator instances
as well. This means locators must get their limits from their
<aclass="reference internal" href="axis_api.html#matplotlib.axis.Axis" title="matplotlib.axis.Axis"><ttclass="xref py py-class docutils literal"><spanclass="pre">matplotlib.axis.Axis</span></tt></a>, which in turn looks up its limits from
the <aclass="reference internal" href="axes_api.html#matplotlib.axes.Axes" title="matplotlib.axes.Axes"><ttclass="xref py py-class docutils literal"><spanclass="pre">Axes</span></tt></a>. If a locator is used temporarily
and not assigned to an Axis or Axes, (e.g., in
<ttclass="xref py py-mod docutils literal"><spanclass="pre">matplotlib.contour</span></tt>), a dummy axis must be created to store its
bounds. Call <ttclass="xref py py-meth docutils literal"><spanclass="pre">matplotlib.ticker.Locator.create_dummy_axis()</span></tt> to
do so.</p>
<p>The functionality of <ttclass="xref py py-class docutils literal"><spanclass="pre">Pbox</span></tt> has been merged with
<aclass="reference internal" href="../devel/transformations.html#matplotlib.transforms.Bbox" title="matplotlib.transforms.Bbox"><ttclass="xref py py-class docutils literal"><spanclass="pre">Bbox</span></tt></a>. Its methods now all return
copies rather than modifying in place.</p>
<p>The following lists many of the simple changes necessary to update
code from the old transformation framework to the new one. In
particular, methods that return a copy are named with a verb in the
past tense, whereas methods that alter an object in place are named
with a verb in the present tense.</p>
<divclass="section" id="matplotlib-transforms">
<h4><aclass="reference internal" href="../devel/transformations.html#module-matplotlib.transforms" title="matplotlib.transforms"><ttclass="xref py py-mod docutils literal"><spanclass="pre">matplotlib.transforms</span></tt></a><aclass="headerlink" href="#matplotlib-transforms" title="Permalink to this headline">¶</a></h4>
<p>The <ttclass="xref py py-class docutils literal"><spanclass="pre">Polar</span></tt> class has moved to <aclass="reference internal" href="../devel/add_new_projection.html#module-matplotlib.projections.polar" title="matplotlib.projections.polar"><ttclass="xref py py-mod docutils literal"><spanclass="pre">matplotlib.projections.polar</span></tt></a>.</p>
<tr><tdclass="label"><aclass="fn-backref" href="#id6">[2]</a></td><td><aclass="reference internal" href="axes_api.html#matplotlib.axes.Axes.get_position" title="matplotlib.axes.Axes.get_position"><ttclass="xref py py-meth docutils literal"><spanclass="pre">matplotlib.axes.Axes.get_position()</span></tt></a> used to return a list
of points, now it returns a <aclass="reference internal" href="../devel/transformations.html#matplotlib.transforms.Bbox" title="matplotlib.transforms.Bbox"><ttclass="xref py py-class docutils literal"><spanclass="pre">matplotlib.transforms.Bbox</span></tt></a>
<tr><tdclass="label"><aclass="fn-backref" href="#id7">[3]</a></td><td><aclass="reference internal" href="axes_api.html#matplotlib.axes.Axes.set_position" title="matplotlib.axes.Axes.set_position"><ttclass="xref py py-meth docutils literal"><spanclass="pre">matplotlib.axes.Axes.set_position()</span></tt></a> now accepts either
four scalars or a <aclass="reference internal" href="../devel/transformations.html#matplotlib.transforms.Bbox" title="matplotlib.transforms.Bbox"><ttclass="xref py py-class docutils literal"><spanclass="pre">matplotlib.transforms.Bbox</span></tt></a> instance.</td></tr>
<tr><tdclass="label"><aclass="fn-backref" href="#id12">[5]</a></td><td><aclass="reference internal" href="artist_api.html#matplotlib.artist.Artist.set_clip_path" title="matplotlib.artist.Artist.set_clip_path"><ttclass="xref py py-meth docutils literal"><spanclass="pre">matplotlib.artist.Artist.set_clip_path()</span></tt></a> now accepts a
<aclass="reference internal" href="path_api.html#matplotlib.path.Path" title="matplotlib.path.Path"><ttclass="xref py py-class docutils literal"><spanclass="pre">matplotlib.path.Path</span></tt></a> instance and a
<aclass="reference internal" href="../devel/transformations.html#matplotlib.transforms.Transform" title="matplotlib.transforms.Transform"><ttclass="xref py py-class docutils literal"><spanclass="pre">matplotlib.transforms.Transform</span></tt></a> that will be applied to
the path immediately before clipping.</td></tr>
</tbody>
</table>
</div>
<divclass="section" id="matplotlib-collections">
<h4><aclass="reference internal" href="collections_api.html#module-matplotlib.collections" title="matplotlib.collections"><ttclass="xref py py-mod docutils literal"><spanclass="pre">matplotlib.collections</span></tt></a><aclass="headerlink" href="#matplotlib-collections" title="Permalink to this headline">¶</a></h4>