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
:func:`matplotlib.image.imread` 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.
Rewrote the :class:`matplotlib.cm.ScalarMappable` callback
infrastructure to use :class:`matplotlib.cbook.CallbackRegistry`
rather than custom callback handling. Any users of
matplotlib.cm.ScalarMappable.add_observer of the
:class:`~matplotlib.cm.ScalarMappable` should use the
:attr:`matplotlib.cm.ScalarMappable.callbacksSM`
:class:`~matplotlib.cbook.CallbackRegistry` instead.
New axes function and Axes method provide control over the plot
color cycle: matplotlib.axes.set_default_color_cycle and
matplotlib.axes.Axes.set_color_cycle.
Matplotlib now requires Python 2.4, so :mod:`matplotlib.cbook` will
no longer provide :class:`set`, :func:`enumerate`, :func:`reversed`
or izip compatibility functions.
In Numpy 1.0, bins are specified by the left edges only. The axes
method :meth:`matplotlib.axes.Axes.hist` now uses future Numpy 1.3
semantics for histograms. Providing binedges, 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.
New axes method and pyplot function,
:func:`~matplotlib.pyplot.hexbin`, is an alternative to
:func:`~matplotlib.pyplot.scatter` for large datasets. It makes
something like a :func:`~matplotlib.pyplot.pcolor` of a 2-D
histogram, but uses hexagonal bins.
New kwarg, symmetric, in :class:`matplotlib.ticker.MaxNLocator`
allows one require an axis to be centered around zero.
Toolkits must now be imported from mpl_toolkits (not matplotlib.toolkits)
Notes about the transforms refactoring
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.
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.
See :mod:`matplotlib.transforms` for a description of the design of
the new transformation framework.
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().
The view intervals are now stored only in one place -- in the
:class:`matplotlib.axes.Axes` instance, not in the locator instances
as well. This means locators must get their limits from their
:class:`matplotlib.axis.Axis`, which in turn looks up its limits from
the :class:`~matplotlib.axes.Axes`. If a locator is used temporarily
and not assigned to an Axis or Axes, (e.g., in
:mod:`matplotlib.contour`), a dummy axis must be created to store its
bounds. Call :meth:`matplotlib.ticker.TickHelper.create_dummy_axis` to
do so.
The functionality of Pbox has been merged with
:class:`~matplotlib.transforms.Bbox`. Its methods now all return
copies rather than modifying in place.
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.
(1, 2, 3, 4) The :class:`~matplotlib.transforms.Bbox` is bound by the points
(x0, y0) to (x1, y1) and there is no defined order to these points,
that is, x0 is not necessarily the left edge of the box. To get
the left edge of the :class:`.Bbox`, use the read-only property
:attr:`xmin <matplotlib.transforms.BboxBase.xmin>`.
Since the recfactoring allows for more than two scale types
('log' or 'linear'), it no longer makes sense to have a toggle.
Axes.toggle_log_lineary() has been removed.
:meth:`matplotlib.artist.Artist.set_clip_path` now accepts a
:class:`matplotlib.path.Path` instance and a
:class:`matplotlib.transforms.Transform` that will be applied to
the path immediately before clipping.
:meth:`matplotlib.backend_bases.GraphicsContextBase.get_clip_path`
returns a tuple of the form (path, affine_transform), where path is a
:class:`matplotlib.path.Path` instance and affine_transform is a
:class:`matplotlib.transforms.Affine2D` instance.
draw_image(self, x, y, im, bbox) is now
:meth:`draw_image(self, x, y, im, bbox, clippath, clippath_trans)
<matplotlib.backend_bases.RendererBase.draw_image>`