diff --git a/doc/api/api_changes.rst b/doc/api/api_changes.rst index 8d991550a6ac..fb94b2ab731f 100644 --- a/doc/api/api_changes.rst +++ b/doc/api/api_changes.rst @@ -37,5 +37,4 @@ added to Matplotlib, see :ref:`whats-new`. next_api_changes/* -.. include:: prev_api_changes/api_changes_3.1.1.rst -.. include:: prev_api_changes/api_changes_3.1.0.rst +.. include:: prev_api_changes/api_changes_3.2.0.rst diff --git a/doc/api/next_api_changes/2018-02-10-AL.rst b/doc/api/next_api_changes/2018-02-10-AL.rst deleted file mode 100644 index 2f56c28ff715..000000000000 --- a/doc/api/next_api_changes/2018-02-10-AL.rst +++ /dev/null @@ -1,27 +0,0 @@ -Deprecations -```````````` - -The ``mpl_toolkits.axes_grid1.colorbar`` module and its colorbar implementation -are deprecated in favor of :mod:`matplotlib.colorbar`, 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 -supported: ``panchor``, ``extendfrac``, ``extendrect``). - -The main differences are: - -- Setting the ticks on the colorbar is done by calling ``colorbar.set_ticks`` - rather than ``colorbar.cbar_axis.set_xticks`` or - ``colorbar.cbar_axis.set_yticks``. -- The colorbar's long axis is accessed with ``colorbar.xaxis`` or - ``colorbar.yaxis`` depending on the orientation, rather than - ``colorbar.cbar_axis``. -- Overdrawing multiple colorbars on top of one another in a single Axes (e.g. - when using the ``cax`` attribute of `~.axes_grid1.axes_grid.ImageGrid` - elements) is not supported; if you previously relied on the second colorbar - being drawn over the first, you can call ``cax.cla()`` to clear the axes - before drawing the second colorbar. - -During the deprecation period, the ``mpl_toolkits.legacy_colorbar`` -rcParam can be set to True to use ``mpl_toolkits.axes_grid1.colorbar`` in -:mod:`mpl_toolkits.axes_grid1` code with a deprecation warning (the default), -or to False to use ``matplotlib.colorbar``. diff --git a/doc/api/next_api_changes/2018-02-18-AL.rst b/doc/api/next_api_changes/2018-02-18-AL.rst deleted file mode 100644 index ba024d8bd260..000000000000 --- a/doc/api/next_api_changes/2018-02-18-AL.rst +++ /dev/null @@ -1,9 +0,0 @@ -Deprecations -```````````` - -For the `mpl_toolkits.axisartist.axis_artist.AttributeCopier` class, the -constructor and the ``set_ref_artist`` method, and the *default_value* -parameter of ``get_attribute_from_ref_artist``, are deprecated. - -Deprecation of the constructor means that classes inheriting from -`.AttributeCopier` should no longer call its constructor. diff --git a/doc/api/next_api_changes/2019-02-07-AL.rst b/doc/api/next_api_changes/2019-02-07-AL.rst deleted file mode 100644 index 599b893b12b7..000000000000 --- a/doc/api/next_api_changes/2019-02-07-AL.rst +++ /dev/null @@ -1,4 +0,0 @@ -Deprecations -```````````` - -``mplot3d.axis3d.get_flip_min_max`` is deprecated. diff --git a/doc/api/next_api_changes/2019-02-19-AL.rst b/doc/api/next_api_changes/2019-02-19-AL.rst deleted file mode 100644 index 3ae4c28eb915..000000000000 --- a/doc/api/next_api_changes/2019-02-19-AL.rst +++ /dev/null @@ -1,5 +0,0 @@ -Deprecations -```````````` - -The unused `Locator.autoscale()` method is deprecated (pass the axis limits to -`Locator.view_limits()` instead). diff --git a/doc/api/next_api_changes/2019-02-24-JMK.rst b/doc/api/next_api_changes/2019-02-24-JMK.rst deleted file mode 100644 index bf85e336afe5..000000000000 --- a/doc/api/next_api_changes/2019-02-24-JMK.rst +++ /dev/null @@ -1,16 +0,0 @@ -`matplotlib.colorbar.Colorbar` uses un-normalized axes for all mappables ------------------------------------------------------------------------- - -Before 3.0, `matplotlib.colorbar.Colorbar` (`~.Figure.colorbar`) normalized -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 *not* contours were constructed with axes that had -limits between ``vmin`` and ``vmax`` of the mappable's norm, and the tickers -were made children of the normal axes tickers. - -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. - -Code that worked around the normalization between 0 and 1 will need to be -modified. diff --git a/doc/api/next_api_changes/2019-03-03-AL.rst b/doc/api/next_api_changes/2019-03-03-AL.rst deleted file mode 100644 index 7be2d21fb808..000000000000 --- a/doc/api/next_api_changes/2019-03-03-AL.rst +++ /dev/null @@ -1,14 +0,0 @@ -Deprecations -```````````` - -The following methods and attributes of the `MovieWriterRegistry` class are -deprecated: ``set_dirty``, ``ensure_not_dirty``, ``reset_available_writers``, -``avail``. - -The ``rcsetup.validate_animation_writer_path`` function is deprecated. - -`MovieWriterRegistry` 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. diff --git a/doc/api/next_api_changes/2019-03-04-AL.rst b/doc/api/next_api_changes/2019-03-04-AL.rst deleted file mode 100644 index 22ee6a8788e3..000000000000 --- a/doc/api/next_api_changes/2019-03-04-AL.rst +++ /dev/null @@ -1,49 +0,0 @@ -Autoscaling changes -``````````````````` - -Matplotlib used to recompute autoscaled limits after every plotting -(``plot()``, ``bar()``, 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. - -In particular, this means that artists added manually with `Axes.add_line`, -`Axes.add_patch`, etc. will be taken into account by the autoscale, even -without an explicit call to `Axes.autoscale_view`. - -In some cases, this can result in different limits being reported. If this is -an issue, consider triggering a draw with `fig.canvas.draw`. - -Autoscaling changes for Collections -``````````````````````````````````` - -Autoscaling has also changed for artists that are based on the `.Collection` -class. Previously, the method that calculates the automatic limits -`.Collection.get_datalim` 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 `.Axes.scatter` 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. - -While the new behavior is algorithmically simpler, it is conditional on -properties of the `.Collection` object: - - 1. ``offsets = None``, ``transform`` is a child of `.Axes.transData`: use the paths - for the automatic limits (i.e. for `.LineCollection` in `.Axes.streamplot`). - 2. ``offsets != None``, and ``offset_transform`` is child of `.Axes.transData`: - - a) ``transform`` is child of `.Axes.transData`: use the ``path + offset`` for - limits (i.e., for `.Axes.bar`). - b) ``transform`` is not a child of `.Axes.transData`: just use the offsets - for the limits (i.e. for scatter) - - 3. otherwise return a null `.Bbox`. - -While this seems complicated, the logic is simply to use the information from -the object that are in data space for the limits, but not information that is -in physical units. diff --git a/doc/api/next_api_changes/2019-03-14-AL.rst b/doc/api/next_api_changes/2019-03-14-AL.rst deleted file mode 100644 index 1e59a5016828..000000000000 --- a/doc/api/next_api_changes/2019-03-14-AL.rst +++ /dev/null @@ -1,6 +0,0 @@ -Deprecations -```````````` - -Passing more than one positional argument or unsupported keyword arguments to -`~matplotlib.axes.Axes.axis()` is deprecated (such arguments used to be -silently ignored). diff --git a/doc/api/next_api_changes/2019-03-19-AL.rst b/doc/api/next_api_changes/2019-03-19-AL.rst deleted file mode 100644 index a0b333ddc247..000000000000 --- a/doc/api/next_api_changes/2019-03-19-AL.rst +++ /dev/null @@ -1,4 +0,0 @@ -Deprecations -```````````` -``NavigationToolbar2Tk.set_active`` is deprecated, as it has no (observable) -effect. diff --git a/doc/api/next_api_changes/2019-03-23-AL.rst b/doc/api/next_api_changes/2019-03-23-AL.rst deleted file mode 100644 index 4d5b7e6d2788..000000000000 --- a/doc/api/next_api_changes/2019-03-23-AL.rst +++ /dev/null @@ -1,7 +0,0 @@ -Deprecations -```````````` - -`.pyplot.plotfile` is deprecated in favor of separately loading and plotting -the data. See :doc:`/gallery/misc/plotfile_demo_sgskip` for various ways to -use pandas or numpy to load data, and pandas or matplotlib to plot the -resulting data. diff --git a/doc/api/next_api_changes/2019-03-29-AL.rst b/doc/api/next_api_changes/2019-03-29-AL.rst deleted file mode 100644 index 675218e2d93a..000000000000 --- a/doc/api/next_api_changes/2019-03-29-AL.rst +++ /dev/null @@ -1,7 +0,0 @@ -Deprecations -```````````` - -The ``matplotlib.testing.disable_internet`` module is deprecated. Use (for -example) pytest-remotedata_ instead. - -.. _pytest-remotedata: https://pypi.org/project/pytest-remotedata/ diff --git a/doc/api/next_api_changes/2019-04-02-AL.rst b/doc/api/next_api_changes/2019-04-02-AL.rst deleted file mode 100644 index 88fdfc992a93..000000000000 --- a/doc/api/next_api_changes/2019-04-02-AL.rst +++ /dev/null @@ -1,8 +0,0 @@ -Deprecations -```````````` - -Setting ``Axis.major.locator``, ``Axis.minor.locator``, ``Axis.major.formatter`` -or ``Axis.minor.formatter`` to an object that is not a subclass of `Locator` or -`Formatter` (respectively) is deprecated. Note that these attributes should -usually be set using `Axis.set_major_locator`, `Axis.set_minor_locator`, etc. -which already raise an exception when an object of the wrong class is passed. diff --git a/doc/api/next_api_changes/2019-04-04-AL.rst b/doc/api/next_api_changes/2019-04-04-AL.rst deleted file mode 100644 index 730c481817e7..000000000000 --- a/doc/api/next_api_changes/2019-04-04-AL.rst +++ /dev/null @@ -1,7 +0,0 @@ -Deprecations -```````````` - -``mpl_toolkits.axisartist.grid_finder.GridFinderBase`` is deprecated (its -only use is to be inherited by the `GridFinder` class which just provides -more defaults in the constructor and directly sets the transforms, so -``GridFinderBase``'s methods were just moved to `GridFinder`). diff --git a/doc/api/next_api_changes/2019-04-09-AL.rst b/doc/api/next_api_changes/2019-04-09-AL.rst deleted file mode 100644 index 4162b58d8b92..000000000000 --- a/doc/api/next_api_changes/2019-04-09-AL.rst +++ /dev/null @@ -1,19 +0,0 @@ -Deprecations -```````````` - -Support in `matplotlib.testing` 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 -``sys.modules``). - -``testing.is_called_from_pytest`` is deprecated. - -During the deprecation period, to force the generation of nose base tests, -import nose first. - -API changes -``````````` - -The default value of the "obj_type" parameter to ``cbook.warn_deprecated`` has -been changed from "attribute" (a default that was never used internally) to the -empty string. diff --git a/doc/api/next_api_changes/2019-04-12-AL.rst b/doc/api/next_api_changes/2019-04-12-AL.rst deleted file mode 100644 index fac43a7d478f..000000000000 --- a/doc/api/next_api_changes/2019-04-12-AL.rst +++ /dev/null @@ -1,5 +0,0 @@ -Deprecations -```````````` - -The ``switch_backend_warn`` parameter to ``matplotlib.test`` has no effect and -is deprecated. diff --git a/doc/api/next_api_changes/2019-04-13-AL.rst b/doc/api/next_api_changes/2019-04-13-AL.rst deleted file mode 100644 index 835429b473c6..000000000000 --- a/doc/api/next_api_changes/2019-04-13-AL.rst +++ /dev/null @@ -1,4 +0,0 @@ -The test suite no longer turns on the Python fault handler by default -````````````````````````````````````````````````````````````````````` - -Set the standard ``PYTHONFAULTHANDLER`` environment variable to do so. diff --git a/doc/api/next_api_changes/2019-04-13-TH.rst b/doc/api/next_api_changes/2019-04-13-TH.rst deleted file mode 100644 index e8c8176cead3..000000000000 --- a/doc/api/next_api_changes/2019-04-13-TH.rst +++ /dev/null @@ -1,7 +0,0 @@ -API changes -``````````` - -`matplotlib.color.is_colorlike()` used to return True for all string -representations of floats. However, only those with values in 0-1 are valid -colors (representing grayscale values). ``is_colorlike()`` now returns False -for string representations of floats outside 0-1. diff --git a/doc/api/next_api_changes/2019-04-14-AL.rst b/doc/api/next_api_changes/2019-04-14-AL.rst deleted file mode 100644 index e5a8b3732729..000000000000 --- a/doc/api/next_api_changes/2019-04-14-AL.rst +++ /dev/null @@ -1,5 +0,0 @@ -Deprecations -```````````` - -``quiver.QuiverKey.quiverkey_doc`` is deprecated; use -``quiver.QuiverKey.__init__.__doc__`` instead. diff --git a/doc/api/next_api_changes/2019-04-16-AL.rst b/doc/api/next_api_changes/2019-04-16-AL.rst deleted file mode 100644 index 058f57ef3219..000000000000 --- a/doc/api/next_api_changes/2019-04-16-AL.rst +++ /dev/null @@ -1,7 +0,0 @@ -Deprecations -```````````` - -Returning a factor equal to None from axisartist Locators (which are **not** -the same as "standard" tick Locators), or passing a factor equal to None -to axisartist Formatters (which are **not** the same as "standard" tick -Formatters) is deprecated. Pass a factor equal to 1 instead. diff --git a/doc/api/next_api_changes/2019-04-17-AL.rst b/doc/api/next_api_changes/2019-04-17-AL.rst deleted file mode 100644 index d6e3862bf9ea..000000000000 --- a/doc/api/next_api_changes/2019-04-17-AL.rst +++ /dev/null @@ -1,24 +0,0 @@ -Change in the application of ``Artist.sticky_edges`` -```````````````````````````````````````````````````` - -Previously, the ``sticky_edges`` 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). - -``sticky_edges`` now have an additional effect on margins application: even if -an axis limit did not coincide with a sticky edge, it cannot *cross* a sticky -edge through margin application -- instead, the margins will only expand the -axis limit until it bumps against the sticky edge. - -This change improves the margins of axes displaying a `~Axes.streamplot`: - -- 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 be sometimes be off by a small floating point error previously). -- if the streamplot does not reach the edges of the vector field (e.g., due to - the use of ``start_points`` and ``maxlength``), then margins expansion will - not cross the the vector field limits anymore. - -This change is also used internally to ensure that polar plots don't display -negative *r* values unless the user really passes in a negative value. diff --git a/doc/api/next_api_changes/2019-04-18-AL.rst b/doc/api/next_api_changes/2019-04-18-AL.rst deleted file mode 100644 index 849c372667c4..000000000000 --- a/doc/api/next_api_changes/2019-04-18-AL.rst +++ /dev/null @@ -1,4 +0,0 @@ -Deprecations -```````````` - -``mlab.apply_window`` and ``mlab.stride_repeat`` are deprecated. diff --git a/doc/api/next_api_changes/2019-04-21-AL.rst b/doc/api/next_api_changes/2019-04-21-AL.rst deleted file mode 100644 index b726a53a0ce0..000000000000 --- a/doc/api/next_api_changes/2019-04-21-AL.rst +++ /dev/null @@ -1,14 +0,0 @@ -Removals -```````` - -The following API elements have been removed: - -- ``backend_gtk3.PIXELS_PER_INCH``, -- ``backend_pgf.re_escapetext``, ``backend_pgf.re_mathdefault``. - -Deprecations -```````````` - -The following API elements are deprecated: - -- ``backend_pgf.repl_escapetext``, ``backend_pgf.repl_mathdefault``. diff --git a/doc/api/next_api_changes/2019-04-22-AL.rst b/doc/api/next_api_changes/2019-04-22-AL.rst deleted file mode 100644 index bddc80cc5b9e..000000000000 --- a/doc/api/next_api_changes/2019-04-22-AL.rst +++ /dev/null @@ -1,5 +0,0 @@ -Deprecations -```````````` - -``matplotlib.get_home`` is deprecated (use e.g. ``os.path.expanduser("~")``) -instead. diff --git a/doc/api/next_api_changes/2019-04-23-AL.rst b/doc/api/next_api_changes/2019-04-23-AL.rst deleted file mode 100644 index 61ad16766bec..000000000000 --- a/doc/api/next_api_changes/2019-04-23-AL.rst +++ /dev/null @@ -1,4 +0,0 @@ -Deprecations -```````````` -``matplotlib.compare_versions`` is deprecated (use comparison of -``distutils.version.LooseVersion``\s instead). diff --git a/doc/api/next_api_changes/2019-04-23-TH.rst b/doc/api/next_api_changes/2019-04-23-TH.rst deleted file mode 100644 index 55c7a20ee859..000000000000 --- a/doc/api/next_api_changes/2019-04-23-TH.rst +++ /dev/null @@ -1,6 +0,0 @@ -API changes -``````````` - -`.Figure.add_subplot()` and `.pyplot.subplot()` do not accept a `figure` -keyword argument anymore. It only used to work anyway if the passed figure -was ``self`` or the current figure, respectively. diff --git a/doc/api/next_api_changes/2019-04-26-AL.rst b/doc/api/next_api_changes/2019-04-26-AL.rst deleted file mode 100644 index 839bb2554b72..000000000000 --- a/doc/api/next_api_changes/2019-04-26-AL.rst +++ /dev/null @@ -1,4 +0,0 @@ -Deprecations -```````````` - -``matplotlib.checkdep_ps_distiller`` is deprecated. diff --git a/doc/api/next_api_changes/2019-04-29-AL.rst b/doc/api/next_api_changes/2019-04-29-AL.rst deleted file mode 100644 index 44f24d59779f..000000000000 --- a/doc/api/next_api_changes/2019-04-29-AL.rst +++ /dev/null @@ -1,5 +0,0 @@ -Deprecations -```````````` - -``FigureCanvasBase.draw_cursor`` (which has never done anything and has never -been overridden in any backend) is deprecated. diff --git a/doc/api/next_api_changes/2019-05-01-AL.rst b/doc/api/next_api_changes/2019-05-01-AL.rst deleted file mode 100644 index 96bbf3775278..000000000000 --- a/doc/api/next_api_changes/2019-05-01-AL.rst +++ /dev/null @@ -1,5 +0,0 @@ -Deprecations -```````````` - -``FigureCanvasMac.invalidate`` is deprecated in favor of its synonym, -``FigureCanvasMac.draw_idle``. diff --git a/doc/api/next_api_changes/2019-05-05-AL.rst b/doc/api/next_api_changes/2019-05-05-AL.rst deleted file mode 100644 index d79ebbb56ef3..000000000000 --- a/doc/api/next_api_changes/2019-05-05-AL.rst +++ /dev/null @@ -1,4 +0,0 @@ -Deprecations -```````````` - -The ``dryrun`` parameter to the various ``FigureCanvasFoo.print_foo`` methods is deprecated. diff --git a/doc/api/next_api_changes/2019-05-06-AL.rst b/doc/api/next_api_changes/2019-05-06-AL.rst deleted file mode 100644 index b1481a1bffd3..000000000000 --- a/doc/api/next_api_changes/2019-05-06-AL.rst +++ /dev/null @@ -1,6 +0,0 @@ -Deprecations -```````````` - -The ``warn`` parameter to `matplotlib.use()` is deprecated (catch the -`ImportError` emitted on backend switch failure and reemit a warning yourself -if so desired). diff --git a/doc/api/next_api_changes/2019-05-08-AL.rst b/doc/api/next_api_changes/2019-05-08-AL.rst deleted file mode 100644 index 028771c002e7..000000000000 --- a/doc/api/next_api_changes/2019-05-08-AL.rst +++ /dev/null @@ -1,9 +0,0 @@ -Deprecations -```````````` - -Passing a ``pad`` size of ``None`` (the default) as a synonym for zero to -the ``append_axes``, ``new_horizontal`` and ``new_vertical`` methods of -`.axes_grid1.axes_divider.AxesDivider` is deprecated. In a future release, the -default value of ``None`` will mean "use :rc:`figure.subplot.wspace` or -:rc:`figure.subplot.hspace`" (depending on the orientation). Explicitly pass -``pad=0`` to keep the old behavior. diff --git a/doc/api/next_api_changes/2019-05-18-TH.rst b/doc/api/next_api_changes/2019-05-18-TH.rst deleted file mode 100644 index 1ea2ddee7cef..000000000000 --- a/doc/api/next_api_changes/2019-05-18-TH.rst +++ /dev/null @@ -1,5 +0,0 @@ -Deprecations -```````````` - -The function `matplotlib.colors.makeMappingArray` is not considered part of -the public API any longer. Thus, it's deprecated. diff --git a/doc/api/next_api_changes/2019-05-19-TH.rst b/doc/api/next_api_changes/2019-05-19-TH.rst deleted file mode 100644 index b378c9164e24..000000000000 --- a/doc/api/next_api_changes/2019-05-19-TH.rst +++ /dev/null @@ -1,5 +0,0 @@ -Deprecations -```````````` - -Using a string of single-character colors as a color sequence (e.g. "rgb") is -deprecated. Use an explicit list instead. \ No newline at end of file diff --git a/doc/api/next_api_changes/2019-05-20-TH.rst b/doc/api/next_api_changes/2019-05-20-TH.rst deleted file mode 100644 index 9d63e17f6609..000000000000 --- a/doc/api/next_api_changes/2019-05-20-TH.rst +++ /dev/null @@ -1,5 +0,0 @@ -Deprecations -```````````` - -``matplotlib.figure.AxesStack`` is considered private API and will be removed -from the public API in future versions. diff --git a/doc/api/next_api_changes/2019-05-21-CB.rst b/doc/api/next_api_changes/2019-05-21-CB.rst deleted file mode 100644 index 39d0cdd29ff8..000000000000 --- a/doc/api/next_api_changes/2019-05-21-CB.rst +++ /dev/null @@ -1,13 +0,0 @@ -``matplotlib.axes.Axes.indicate_inset`` returns a 4-tuple as documented ------------------------------------------------------------------------ - -In <= 3.1.0, ``matplotlib.axes.Axes.indicate_inset`` and -``matplotlib.axes.Axes.indicate_inset_zoom`` were documented as returning -a 4-tuple of ``matplotlib.patches.ConnectionPatch`` es, where in fact they -returned a 4-length list. - -They now correctly return a 4-tuple. -``matplotlib.axes.Axes.indicate_inset`` would previously raise an error if -the optional *inset_ax* was not supplied; it now completes successfully, -and returns *None* instead of the tuple of ``ConnectionPatch`` es. - diff --git a/doc/api/next_api_changes/2019-05-26-AL.rst b/doc/api/next_api_changes/2019-05-26-AL.rst deleted file mode 100644 index b169193f605b..000000000000 --- a/doc/api/next_api_changes/2019-05-26-AL.rst +++ /dev/null @@ -1,4 +0,0 @@ -Deprecations -```````````` - -``rcsetup.ValidateInterval`` is deprecated. diff --git a/doc/api/next_api_changes/2019-05-27-AL.rst b/doc/api/next_api_changes/2019-05-27-AL.rst deleted file mode 100644 index 2f9357811c20..000000000000 --- a/doc/api/next_api_changes/2019-05-27-AL.rst +++ /dev/null @@ -1,5 +0,0 @@ -Deprecations -```````````` - -``rcsetup.validate_path_exists`` is deprecated (use ``os.path.exists`` to check -whether a path exists). diff --git a/doc/api/next_api_changes/2019-05-28-AL.rst b/doc/api/next_api_changes/2019-05-28-AL.rst deleted file mode 100644 index 08ad0b3218bf..000000000000 --- a/doc/api/next_api_changes/2019-05-28-AL.rst +++ /dev/null @@ -1,6 +0,0 @@ -Deprecations -```````````` - -Setting the ``whis`` parameter of `.Axes.boxplot` and `.cbook.boxplot_stats` 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. diff --git a/doc/api/next_api_changes/2019-05-30-AL.rst b/doc/api/next_api_changes/2019-05-30-AL.rst deleted file mode 100644 index 5a00e1ea26c1..000000000000 --- a/doc/api/next_api_changes/2019-05-30-AL.rst +++ /dev/null @@ -1,10 +0,0 @@ -Changes to the Matplotlib build -``````````````````````````````` - -Previously, it was possible to package Windows DLLs into the Maptlotlib -wheel (or sdist) by copying them into the source tree and setting the -``package_data.dlls`` entry in ``setup.cfg``. - -DLLs copied in the source tree are now always packaged; the -``package_data.dlls`` entry has no effect anymore. If you do not want to -include the DLLs, don't copy them into the source tree. diff --git a/doc/api/next_api_changes/2019-06-05-JKS.rst b/doc/api/next_api_changes/2019-06-05-JKS.rst deleted file mode 100644 index 11ce896a7d8f..000000000000 --- a/doc/api/next_api_changes/2019-06-05-JKS.rst +++ /dev/null @@ -1,11 +0,0 @@ -Removals -```````` - -The following members of ``matplotlib.backends.backend_pdf.PdfFile`` were removed: - -- ``nextObject`` -- ``nextFont`` -- ``nextAlphaState`` -- ``nextHatch`` -- ``nextImage`` -- ``alphaStateObject`` diff --git a/doc/api/next_api_changes/2019-06-09-AL.rst b/doc/api/next_api_changes/2019-06-09-AL.rst deleted file mode 100644 index abff448fe0fd..000000000000 --- a/doc/api/next_api_changes/2019-06-09-AL.rst +++ /dev/null @@ -1,6 +0,0 @@ -Changes in font weight guessing -``````````````````````````````` - -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. diff --git a/doc/api/next_api_changes/2019-06-09-TH.rst b/doc/api/next_api_changes/2019-06-09-TH.rst deleted file mode 100644 index 056b7c0cf48d..000000000000 --- a/doc/api/next_api_changes/2019-06-09-TH.rst +++ /dev/null @@ -1,8 +0,0 @@ -Passing scalars to parameter where in ``fill_between()`` and ``fill_betweenx()`` -```````````````````````````````````````````````````````````````````````````````` - -Passing scalars to parameter *where* in ``fill_between()`` and -``fill_betweenx()`` is deprecated. While the documentation already states that -*where* must be of the same size as *x* (or *y*), scalars were accepted and -broadcasted to the size of *x*. Non-matching sizes will raise a ``ValueError`` -in the future. diff --git a/doc/api/next_api_changes/2019-06-10-AL.rst b/doc/api/next_api_changes/2019-06-10-AL.rst deleted file mode 100644 index cf421186038b..000000000000 --- a/doc/api/next_api_changes/2019-06-10-AL.rst +++ /dev/null @@ -1,10 +0,0 @@ -RendererSVG now uses a single counter for externally written images -``````````````````````````````````````````````````````````````````` - -When using `RendererSVG` with ``rcParams["svg.image_inline"] == -True``, externally written images now use a single counter even if the -``renderer.basename`` attribute is overwritten, rather than a counter per -basename. - -This change will only affect you if you used ``rcParams["svg.image_inline"] = True`` -(the default is False) *and* manually modified ``renderer.basename``. diff --git a/doc/api/next_api_changes/2019-06-13-AL.rst b/doc/api/next_api_changes/2019-06-13-AL.rst index 9c45da6ac882..79c4fd73c1a4 100644 --- a/doc/api/next_api_changes/2019-06-13-AL.rst +++ b/doc/api/next_api_changes/2019-06-13-AL.rst @@ -2,5 +2,3 @@ Deprecations ```````````` ``BboxBase.is_unit`` is deprecated (check the Bbox extents if needed). - -``axes3d.unit_bbox`` is deprecated (use ``Bbox.unit`` instead). diff --git a/doc/api/next_api_changes/2019-06-18-AL.rst b/doc/api/next_api_changes/2019-06-18-AL.rst deleted file mode 100644 index 6d17aaa2ad11..000000000000 --- a/doc/api/next_api_changes/2019-06-18-AL.rst +++ /dev/null @@ -1,4 +0,0 @@ -Deprecations -```````````` - -``testing.jpl_units.UnitDbl.UnitDbl.checkUnits`` is deprecated. diff --git a/doc/api/next_api_changes/2019-06-19-AL.rst b/doc/api/next_api_changes/2019-06-19-AL.rst deleted file mode 100644 index 9d00100dc096..000000000000 --- a/doc/api/next_api_changes/2019-06-19-AL.rst +++ /dev/null @@ -1,10 +0,0 @@ -log-scale bar() / hist() autolimits change -`````````````````````````````````````````` - -The autolimits computation in `~.Axes.bar` and `~.Axes.hist` 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 `~.Axes.bar` and `~.Axes.hist`, and -when calling ``bar(..., log=True)`` / ``hist(..., log=True)``: 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. diff --git a/doc/api/next_api_changes/2019-06-25-AL.rst b/doc/api/next_api_changes/2019-06-25-AL.rst deleted file mode 100644 index 9c5467d3f747..000000000000 --- a/doc/api/next_api_changes/2019-06-25-AL.rst +++ /dev/null @@ -1,7 +0,0 @@ -API changes -``````````` - -``Locator.nonsingular`` (introduced in mpl 3.1), ``DateLocator.nonsingular``, and -``AutoDateLocator.nonsingular`` now returns a range ``v0, v1`` with ``v0 <= v1``. -This behavior is consistent with the implementation of ``nonsingular`` by the -``LogLocator`` and ``LogitLocator`` subclasses. diff --git a/doc/api/next_api_changes/2019-07-03-AL.rst b/doc/api/next_api_changes/2019-07-03-AL.rst deleted file mode 100644 index e1a56f99f9cd..000000000000 --- a/doc/api/next_api_changes/2019-07-03-AL.rst +++ /dev/null @@ -1,7 +0,0 @@ -Deprecations -```````````` - -``cm.revcmap`` is deprecated. Use `.Colormap.reversed` to reverse a colormap. - -``cm.datad`` no longer contains entries for reversed colormaps in their -"unconverted" form. diff --git a/doc/api/next_api_changes/2019-07-09-AL.rst b/doc/api/next_api_changes/2019-07-09-AL.rst deleted file mode 100644 index b9b97a6ca9db..000000000000 --- a/doc/api/next_api_changes/2019-07-09-AL.rst +++ /dev/null @@ -1,8 +0,0 @@ -API changes -``````````` - -``Axes.get_data_ratio`` 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. - -``Axes.get_data_ratio_log`` is deprecated. diff --git a/doc/api/next_api_changes/2019-07-10-AL.rst b/doc/api/next_api_changes/2019-07-10-AL.rst deleted file mode 100644 index d3690b0b00e3..000000000000 --- a/doc/api/next_api_changes/2019-07-10-AL.rst +++ /dev/null @@ -1,5 +0,0 @@ -Deprecations -```````````` - -``backend_wx.ConfigureSubplotsWx.configure_subplots`` and -``backend_wx.ConfigureSubplotsWx.get_canvas`` are deprecated. diff --git a/doc/api/next_api_changes/2019-07-11-AL.rst b/doc/api/next_api_changes/2019-07-11-AL.rst deleted file mode 100644 index e468c2eb3b62..000000000000 --- a/doc/api/next_api_changes/2019-07-11-AL.rst +++ /dev/null @@ -1,6 +0,0 @@ -Deprecations -```````````` - -``FigureFrameWx.statusbar`` and ``NavigationToolbar2Wx.statbar`` are deprecated. -The status bar can be retrieved by calling standard wx methods -(``frame.GetStatusBar()`` and ``toolbar.GetTopLevelParent().GetStatusBar()``). diff --git a/doc/api/next_api_changes/2019-07-15-AL.rst b/doc/api/next_api_changes/2019-07-15-AL.rst deleted file mode 100644 index 6fac8917ae20..000000000000 --- a/doc/api/next_api_changes/2019-07-15-AL.rst +++ /dev/null @@ -1,8 +0,0 @@ -API changes and deprecations -```````````````````````````` - -``axisartist.axis_artist.BezierPath`` is deprecated (use `.patches.PathPatch` -to draw arbitrary Paths). - -``AxisArtist.line`` is now a `.patches.PathPatch` instance instead of a -``BezierPath`` instance. diff --git a/doc/api/next_api_changes/2019-07-16-AL.rst b/doc/api/next_api_changes/2019-07-16-AL.rst deleted file mode 100644 index d80af0da5552..000000000000 --- a/doc/api/next_api_changes/2019-07-16-AL.rst +++ /dev/null @@ -1,4 +0,0 @@ -Deprecations -```````````` - -``dates.mx2num`` is deprecated. diff --git a/doc/api/next_api_changes/2019-07-16-EF.rst b/doc/api/next_api_changes/2019-07-16-EF.rst deleted file mode 100644 index 15143065960e..000000000000 --- a/doc/api/next_api_changes/2019-07-16-EF.rst +++ /dev/null @@ -1,6 +0,0 @@ -Deprecations -```````````` - -The "smart_bounds" functionality is deprecated. This includes -``Axis.set_smart_bounds()``, ``Axis.get_smart_bounds()``, -``Spine.set_smart_bounds()``, and ``Spine.get_smart_bounds()``. diff --git a/doc/api/next_api_changes/2019-07-16-TH.rst b/doc/api/next_api_changes/2019-07-16-TH.rst deleted file mode 100644 index 6ba80811bd15..000000000000 --- a/doc/api/next_api_changes/2019-07-16-TH.rst +++ /dev/null @@ -1,6 +0,0 @@ -Backends do not need to explicitly define the flag ``supports_blit`` anymore -```````````````````````````````````````````````````````````````````````````` - -This is only relevant for backend developers. Backends had to define the flag -``supports_blit``. This is not needed anymore because the blitting capability -is now automatically detected. \ No newline at end of file diff --git a/doc/api/next_api_changes/2019-07-17-JMK.rst b/doc/api/next_api_changes/2019-07-17-JMK.rst deleted file mode 100644 index 6e15b9023b77..000000000000 --- a/doc/api/next_api_changes/2019-07-17-JMK.rst +++ /dev/null @@ -1,22 +0,0 @@ -Default interpolation for `image` is new "antialiased" option -------------------------------------------------------------- - -Images displayed in Matplotlib previously used nearest-neighbor -interpolation, leading to aliasing effects for downscaling and non-integer -upscaling. - -New default for :rc:`image.interpolation` is the new option "antialiased". -`imshow(A, interpolation='antialiased')` will apply a Hanning filter when -resampling the data in A for display (or saving to file) *if* the upsample -rate is less than a factor of three, and not an integer; downsampled data is -always smoothed at resampling. - -To get the old behavior, set :rc:`interpolation` to the old default "nearest" -(or specify the ``interpolation`` kwarg of `.Axes.imshow`) - -To always get the anti-aliasing behavior, no matter what the up/down sample -rate, set :rc:`interpolation` to "hanning" (or one of the other filters -available. - -Note that the "hanning" filter was chosen because it has only a modest -performance penalty. Anti-aliasing can be improved with other filters. diff --git a/doc/api/next_api_changes/2019-07-18-SL.rst b/doc/api/next_api_changes/2019-07-18-SL.rst deleted file mode 100644 index f9038e290475..000000000000 --- a/doc/api/next_api_changes/2019-07-18-SL.rst +++ /dev/null @@ -1,4 +0,0 @@ -Reduced default value of :rc:`axes.formatter.limits` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Changed the default value of :rc:`axes.formatter.limits` from -7, 7 to -5, 6 for better readability. diff --git a/doc/api/next_api_changes/2019-07-20-AL.rst b/doc/api/next_api_changes/2019-07-20-AL.rst deleted file mode 100644 index 38ad883abb79..000000000000 --- a/doc/api/next_api_changes/2019-07-20-AL.rst +++ /dev/null @@ -1,4 +0,0 @@ -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 ``get_canvas_width_height`` in the rest of the codebase. diff --git a/doc/api/next_api_changes/2019-07-23-AL.rst b/doc/api/next_api_changes/2019-07-23-AL.rst deleted file mode 100644 index 07d6db9f9815..000000000000 --- a/doc/api/next_api_changes/2019-07-23-AL.rst +++ /dev/null @@ -1,5 +0,0 @@ -API changes -``````````` - -The ``matplotlib.testing.determinism`` module, which exposes no public API, has -been deleted. diff --git a/doc/api/next_api_changes/2019-07-27-AL.rst b/doc/api/next_api_changes/2019-07-27-AL.rst deleted file mode 100644 index 1d4040e6fdf7..000000000000 --- a/doc/api/next_api_changes/2019-07-27-AL.rst +++ /dev/null @@ -1,6 +0,0 @@ -Deprecations -```````````` - -The ``as_str``, ``as_rgba_str``, ``as_array``, ``get_width`` and ``get_height`` -methods of ``matplotlib.ft2font.FT2Image`` are deprecated. Convert the ``FT2Image`` -to a numpy array with ``np.asarray`` before processing it. diff --git a/doc/api/next_api_changes/2019-07-30-AL.rst b/doc/api/next_api_changes/2019-07-30-AL.rst deleted file mode 100644 index 3d9b293e7595..000000000000 --- a/doc/api/next_api_changes/2019-07-30-AL.rst +++ /dev/null @@ -1,9 +0,0 @@ -API deprecations -```````````````` - -Setting :rc:`savefig.format` to "auto" is deprecated; use its synonym "png" instead. - -Setting :rc:`text.hinting` to True or False is deprecated; use their synonyms -"auto" or "none" instead. - -``rcsetup.update_savefig_format`` is deprecated. diff --git a/doc/api/next_api_changes/2019-08-16-AL.rst b/doc/api/next_api_changes/2019-08-16-AL.rst deleted file mode 100644 index f736bb6af2c1..000000000000 --- a/doc/api/next_api_changes/2019-08-16-AL.rst +++ /dev/null @@ -1,5 +0,0 @@ -API changes -``````````` - -``font_manager.createFontList`` is deprecated. `.font_manager.FontManager.addfont` -is now available to register a font at a given path. diff --git a/doc/api/next_api_changes/2019-08-18-AL.rst b/doc/api/next_api_changes/2019-08-18-AL.rst deleted file mode 100644 index 5d3dd7934919..000000000000 --- a/doc/api/next_api_changes/2019-08-18-AL.rst +++ /dev/null @@ -1,5 +0,0 @@ -Deprecations -```````````` - -``font_manager.JSONEncoder`` is deprecated. Use `.font_manager.json_dump` to -dump a `.FontManager` instance. diff --git a/doc/api/next_api_changes/2019-08-19-pass_gid.rst b/doc/api/next_api_changes/2019-08-19-pass_gid.rst deleted file mode 100644 index ebc18b0ec886..000000000000 --- a/doc/api/next_api_changes/2019-08-19-pass_gid.rst +++ /dev/null @@ -1,10 +0,0 @@ -The ``gid`` is now correctly passed to svg output -````````````````````````````````````````````````` - -Previously, if a figure, axis, legend or some other artists had a custom -``gid`` set (e.g. via ``.set_gid()``), this would not be reflected in -the svg output. Instead a default gid, like ``figure_1`` would be shown. -This is now fixed, such that e.g. ``fig.set_gid("myfigure")`` correctly -shows up as ```` in the svg file. If you relied on the -gid having the default format, you now need to make sure not to set the -``gid`` parameter of the artists. \ No newline at end of file diff --git a/doc/api/prev_api_changes/api_changes_3.2.0.rst b/doc/api/prev_api_changes/api_changes_3.2.0.rst new file mode 100644 index 000000000000..e6d79890e2cc --- /dev/null +++ b/doc/api/prev_api_changes/api_changes_3.2.0.rst @@ -0,0 +1,14 @@ +API Changes for 3.2.0 +===================== + +.. contents:: + :local: + :depth: 1 + +.. include:: /api/prev_api_changes/api_changes_3.2.0/behavior.rst + +.. include:: /api/prev_api_changes/api_changes_3.2.0/deprecations.rst + +.. include:: /api/prev_api_changes/api_changes_3.2.0/removals.rst + +.. include:: /api/prev_api_changes/api_changes_3.2.0/development.rst diff --git a/doc/api/prev_api_changes/api_changes_3.2.0/behavior.rst b/doc/api/prev_api_changes/api_changes_3.2.0/behavior.rst new file mode 100644 index 000000000000..0c12c96e13af --- /dev/null +++ b/doc/api/prev_api_changes/api_changes_3.2.0/behavior.rst @@ -0,0 +1,222 @@ + +Behavior changes +---------------- + +`matplotlib.colorbar.Colorbar` uses un-normalized axes for all mappables +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Before 3.0, `matplotlib.colorbar.Colorbar` (`~.Figure.colorbar`) normalized +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 *not* contours were constructed with axes that had +limits between ``vmin`` and ``vmax`` of the mappable's norm, and the tickers +were made children of the normal axes tickers. + +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. + +Code that worked around the normalization between 0 and 1 will need to be +modified. + +`MovieWriterRegistry` +~~~~~~~~~~~~~~~~~~~~~ +`MovieWriterRegistry` 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. + +Autoscaling +~~~~~~~~~~~ + +Matplotlib used to recompute autoscaled limits after every plotting +(``plot()``, ``bar()``, 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. + +In particular, this means that artists added manually with `Axes.add_line`, +`Axes.add_patch`, etc. will be taken into account by the autoscale, even +without an explicit call to `Axes.autoscale_view`. + +In some cases, this can result in different limits being reported. If this is +an issue, consider triggering a draw with `fig.canvas.draw`. + +Autoscaling has also changed for artists that are based on the `.Collection` +class. Previously, the method that calculates the automatic limits +`.Collection.get_datalim` 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 `.Axes.scatter` 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. + +While the new behavior is algorithmically simpler, it is conditional on +properties of the `.Collection` object: + + 1. ``offsets = None``, ``transform`` is a child of `.Axes.transData`: use the paths + for the automatic limits (i.e. for `.LineCollection` in `.Axes.streamplot`). + 2. ``offsets != None``, and ``offset_transform`` is child of `.Axes.transData`: + + a) ``transform`` is child of `.Axes.transData`: use the ``path + offset`` for + limits (i.e., for `.Axes.bar`). + b) ``transform`` is not a child of `.Axes.transData`: just use the offsets + for the limits (i.e. for scatter) + + 3. otherwise return a null `.Bbox`. + +While this seems complicated, the logic is simply to use the information from +the object that are in data space for the limits, but not information that is +in physical units. + +log-scale bar() / hist() autolimits +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The autolimits computation in `~.Axes.bar` and `~.Axes.hist` 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 `~.Axes.bar` and `~.Axes.hist`, and +when calling ``bar(..., log=True)`` / ``hist(..., log=True)``: 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. + +nonsingular Locators +~~~~~~~~~~~~~~~~~~~~ +``Locator.nonsingular`` (introduced in mpl 3.1), ``DateLocator.nonsingular``, and +``AutoDateLocator.nonsingular`` now returns a range ``v0, v1`` with ``v0 <= v1``. +This behavior is consistent with the implementation of ``nonsingular`` by the +``LogLocator`` and ``LogitLocator`` subclasses. + +``get_data_ratio`` +~~~~~~~~~~~~~~~~~~ +``Axes.get_data_ratio`` 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. + +Artist sticky edges +~~~~~~~~~~~~~~~~~~~ +Previously, the ``sticky_edges`` 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). + +``sticky_edges`` now have an additional effect on margins application: even if +an axis limit did not coincide with a sticky edge, it cannot *cross* a sticky +edge through margin application -- instead, the margins will only expand the +axis limit until it bumps against the sticky edge. + +This change improves the margins of axes displaying a `~Axes.streamplot`: + +- 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 be sometimes be off by a small floating point error previously). +- if the streamplot does not reach the edges of the vector field (e.g., due to + the use of ``start_points`` and ``maxlength``), then margins expansion will + not cross the the vector field limits anymore. + +This change is also used internally to ensure that polar plots don't display +negative *r* values unless the user really passes in a negative value. + +``gid`` in svg output +~~~~~~~~~~~~~~~~~~~~~ +Previously, if a figure, axis, legend or some other artists had a custom +``gid`` set (e.g. via ``.set_gid()``), this would not be reflected in +the svg output. Instead a default gid, like ``figure_1`` would be shown. +This is now fixed, such that e.g. ``fig.set_gid("myfigure")`` correctly +shows up as ```` in the svg file. If you relied on the +gid having the default format, you now need to make sure not to set the +``gid`` parameter of the artists. + +Fonts +~~~~~ +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. + +Color-like checking +~~~~~~~~~~~~~~~~~~~ +`matplotlib.color.is_colorlike()` used to return True for all string +representations of floats. However, only those with values in 0-1 are valid +colors (representing grayscale values). ``is_colorlike()`` now returns False +for string representations of floats outside 0-1. + +Default image interpolation +~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Images displayed in Matplotlib previously used nearest-neighbor +interpolation, leading to aliasing effects for downscaling and non-integer +upscaling. + +New default for :rc:`image.interpolation` is the new option "antialiased". +`imshow(A, interpolation='antialiased')` will apply a Hanning filter when +resampling the data in A for display (or saving to file) *if* the upsample +rate is less than a factor of three, and not an integer; downsampled data is +always smoothed at resampling. + +To get the old behavior, set :rc:`interpolation` to the old default "nearest" +(or specify the ``interpolation`` kwarg of `.Axes.imshow`) + +To always get the anti-aliasing behavior, no matter what the up/down sample +rate, set :rc:`interpolation` to "hanning" (or one of the other filters +available. + +Note that the "hanning" filter was chosen because it has only a modest +performance penalty. Anti-aliasing can be improved with other filters. + +rcParams +~~~~~~~~ +When using `RendererSVG` with ``rcParams["svg.image_inline"] == +True``, externally written images now use a single counter even if the +``renderer.basename`` attribute is overwritten, rather than a counter per +basename. + +This change will only affect you if you used ``rcParams["svg.image_inline"] = True`` +(the default is False) *and* manually modified ``renderer.basename``. + +Changed the default value of :rc:`axes.formatter.limits` from -7, 7 to -5, 6 +for better readability. + +``add_subplot()`` +~~~~~~~~~~~~~~~~~ +`.Figure.add_subplot()` and `.pyplot.subplot()` do not accept a `figure` +keyword argument anymore. It only used to work anyway if the passed figure +was ``self`` or the current figure, respectively. + +``indicate_inset()`` +~~~~~~~~~~~~~~~~~~~~ +In <= 3.1.0, `~matplotlib.axes.Axes.indicate_inset` and +`~matplotlib.axes.Axes.indicate_inset_zoom` were documented as returning +a 4-tuple of `~matplotlib.patches.ConnectionPatch`, where in fact they +returned a 4-length list. + +They now correctly return a 4-tuple. +`~matplotlib.axes.Axes.indicate_inset` would previously raise an error if +the optional *inset_ax* was not supplied; it now completes successfully, +and returns *None* instead of the tuple of ``ConnectionPatch``. + +PGF backend +~~~~~~~~~~~ +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 ``get_canvas_width_height`` +in the rest of the codebase. + +`~matplotlib.cbook` +~~~~~~~~~~~~~~~~~~~ +The default value of the "obj_type" parameter to ``cbook.warn_deprecated`` has +been changed from "attribute" (a default that was never used internally) to the +empty string. + +Testing +~~~~~~~ +The test suite no longer turns on the Python fault handler by default. +Set the standard ``PYTHONFAULTHANDLER`` environment variable to do so. + +Backend ``supports_blit`` +~~~~~~~~~~~~~~~~~~~~~~~~~ +Backends do not need to explicitly define the flag ``supports_blit`` anymore. +This is only relevant for backend developers. Backends had to define the flag +``supports_blit``. This is not needed anymore because the blitting capability +is now automatically detected. diff --git a/doc/api/prev_api_changes/api_changes_3.2.0/deprecations.rst b/doc/api/prev_api_changes/api_changes_3.2.0/deprecations.rst new file mode 100644 index 000000000000..d3660ef0826d --- /dev/null +++ b/doc/api/prev_api_changes/api_changes_3.2.0/deprecations.rst @@ -0,0 +1,246 @@ + +Deprecations +------------ + +`matplotlib.use` +~~~~~~~~~~~~~~~~ +The ``warn`` parameter to `matplotlib.use()` is deprecated (catch the +`ImportError` emitted on backend switch failure and reemit a warning yourself +if so desired). + +plotfile +~~~~~~~~ +`.pyplot.plotfile` is deprecated in favor of separately loading and plotting +the data. See :doc:`/gallery/misc/plotfile_demo_sgskip` for various ways to +use pandas or numpy to load data, and pandas or matplotlib to plot the +resulting data. + +axes and axis +~~~~~~~~~~~~~ +Setting ``Axis.major.locator``, ``Axis.minor.locator``, ``Axis.major.formatter`` +or ``Axis.minor.formatter`` to an object that is not a subclass of `Locator` or +`Formatter` (respectively) is deprecated. Note that these attributes should +usually be set using `Axis.set_major_locator`, `Axis.set_minor_locator`, etc. +which already raise an exception when an object of the wrong class is passed. + +Passing more than one positional argument or unsupported keyword arguments to +`~matplotlib.axes.Axes.axis()` is deprecated (such arguments used to be +silently ignored). + +``axes_grid1`` +~~~~~~~~~~~~~~ +The ``mpl_toolkits.axes_grid1.colorbar`` module and its colorbar implementation +are deprecated in favor of :mod:`matplotlib.colorbar`, 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 +supported: ``panchor``, ``extendfrac``, ``extendrect``). + +The main differences are: + +- Setting the ticks on the colorbar is done by calling ``colorbar.set_ticks`` + rather than ``colorbar.cbar_axis.set_xticks`` or + ``colorbar.cbar_axis.set_yticks``. +- The colorbar's long axis is accessed with ``colorbar.xaxis`` or + ``colorbar.yaxis`` depending on the orientation, rather than + ``colorbar.cbar_axis``. +- Overdrawing multiple colorbars on top of one another in a single Axes (e.g. + when using the ``cax`` attribute of `~.axes_grid1.axes_grid.ImageGrid` + elements) is not supported; if you previously relied on the second colorbar + being drawn over the first, you can call ``cax.cla()`` to clear the axes + before drawing the second colorbar. + +During the deprecation period, the ``mpl_toolkits.legacy_colorbar`` +rcParam can be set to True to use ``mpl_toolkits.axes_grid1.colorbar`` in +:mod:`mpl_toolkits.axes_grid1` code with a deprecation warning (the default), +or to False to use ``matplotlib.colorbar``. + +Passing a ``pad`` size of ``None`` (the default) as a synonym for zero to +the ``append_axes``, ``new_horizontal`` and ``new_vertical`` methods of +`.axes_grid1.axes_divider.AxesDivider` is deprecated. In a future release, the +default value of ``None`` will mean "use :rc:`figure.subplot.wspace` or +:rc:`figure.subplot.hspace`" (depending on the orientation). Explicitly pass +``pad=0`` to keep the old behavior. + +Axes3D +~~~~~~ +``mplot3d.axis3d.get_flip_min_max`` is deprecated. + +``axes3d.unit_bbox`` is deprecated (use ``Bbox.unit`` instead). + +`matplotlib.cm` +~~~~~~~~~~~~~~~ +``cm.revcmap`` is deprecated. Use `.Colormap.reversed` to reverse a colormap. + +``cm.datad`` no longer contains entries for reversed colormaps in their +"unconverted" form. + +axisartist +~~~~~~~~~~ +``mpl_toolkits.axisartist.grid_finder.GridFinderBase`` is deprecated (its +only use is to be inherited by the `GridFinder` class which just provides +more defaults in the constructor and directly sets the transforms, so +``GridFinderBase``'s methods were just moved to `GridFinder`). + +``axisartist.axis_artist.BezierPath`` is deprecated (use `.patches.PathPatch` +to draw arbitrary Paths). + +``AxisArtist.line`` is now a `.patches.PathPatch` instance instead of a +``BezierPath`` instance. + +Returning a factor equal to None from axisartist Locators (which are **not** +the same as "standard" tick Locators), or passing a factor equal to None +to axisartist Formatters (which are **not** the same as "standard" tick +Formatters) is deprecated. Pass a factor equal to 1 instead. + +For the `mpl_toolkits.axisartist.axis_artist.AttributeCopier` class, the +constructor and the ``set_ref_artist`` method, and the *default_value* +parameter of ``get_attribute_from_ref_artist``, are deprecated. + +Deprecation of the constructor means that classes inheriting from +`.AttributeCopier` should no longer call its constructor. + +Locators +~~~~~~~~ +The unused `Locator.autoscale()` method is deprecated (pass the axis limits to +`Locator.view_limits()` instead). + +Animation +~~~~~~~~~ +The following methods and attributes of the `MovieWriterRegistry` class are +deprecated: ``set_dirty``, ``ensure_not_dirty``, ``reset_available_writers``, +``avail``. + +``smart_bounds()`` +~~~~~~~~~~~~~~~~~~ +The "smart_bounds" functionality is deprecated. This includes +``Axis.set_smart_bounds()``, ``Axis.get_smart_bounds()``, +``Spine.set_smart_bounds()``, and ``Spine.get_smart_bounds()``. + +``boxplot()`` +~~~~~~~~~~~~~ +Setting the ``whis`` parameter of `.Axes.boxplot` and `.cbook.boxplot_stats` 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. + +``fill_between()`` +~~~~~~~~~~~~~~~~~~ +Passing scalars to parameter *where* in ``fill_between()`` and +``fill_betweenx()`` is deprecated. While the documentation already states that +*where* must be of the same size as *x* (or *y*), scalars were accepted and +broadcasted to the size of *x*. Non-matching sizes will raise a ``ValueError`` +in the future. + +rcParams +~~~~~~~~ +The ``rcsetup.validate_animation_writer_path`` function is deprecated. + +Setting :rc:`savefig.format` to "auto" is deprecated; use its synonym "png" instead. + +Setting :rc:`text.hinting` to True or False is deprecated; use their synonyms +"auto" or "none" instead. + +``rcsetup.update_savefig_format`` is deprecated. + +``rcsetup.validate_path_exists`` is deprecated (use ``os.path.exists`` to check +whether a path exists). + +``rcsetup.ValidateInterval`` is deprecated. + +Dates +~~~~~ +``dates.mx2num`` is deprecated. + +TK +~~ +``NavigationToolbar2Tk.set_active`` is deprecated, as it has no (observable) +effect. + +WX +~~ +``FigureFrameWx.statusbar`` and ``NavigationToolbar2Wx.statbar`` are deprecated. +The status bar can be retrieved by calling standard wx methods +(``frame.GetStatusBar()`` and ``toolbar.GetTopLevelParent().GetStatusBar()``). + +``backend_wx.ConfigureSubplotsWx.configure_subplots`` and +``backend_wx.ConfigureSubplotsWx.get_canvas`` are deprecated. + +PGF +~~~ +``backend_pgf.repl_escapetext`` and ``backend_pgf.repl_mathdefault`` are +deprecated. + +FigureCanvas +~~~~~~~~~~~~ +``FigureCanvasBase.draw_cursor`` (which has never done anything and has never +been overridden in any backend) is deprecated. + +``FigureCanvasMac.invalidate`` is deprecated in favor of its synonym, +``FigureCanvasMac.draw_idle``. + +The ``dryrun`` parameter to the various ``FigureCanvasFoo.print_foo`` methods +is deprecated. + + +QuiverKey doc +~~~~~~~~~~~~~ +``quiver.QuiverKey.quiverkey_doc`` is deprecated; use +``quiver.QuiverKey.__init__.__doc__`` instead. + +`matplotlib.mlab` +~~~~~~~~~~~~~~~~~ +``mlab.apply_window`` and ``mlab.stride_repeat`` are deprecated. + +Fonts +~~~~~ +``font_manager.JSONEncoder`` is deprecated. Use `.font_manager.json_dump` to +dump a `.FontManager` instance. + +``font_manager.createFontList`` is deprecated. `.font_manager.FontManager.addfont` +is now available to register a font at a given path. + +The ``as_str``, ``as_rgba_str``, ``as_array``, ``get_width`` and ``get_height`` +methods of ``matplotlib.ft2font.FT2Image`` are deprecated. Convert the ``FT2Image`` +to a numpy array with ``np.asarray`` before processing it. + +Colors +~~~~~~ +The function `matplotlib.colors.makeMappingArray` is not considered part of +the public API any longer. Thus, it's deprecated. + +Using a string of single-character colors as a color sequence (e.g. "rgb") is +deprecated. Use an explicit list instead. + +Testing +~~~~~~~ +The ``matplotlib.testing.disable_internet`` module is deprecated. Use (for +example) pytest-remotedata_ instead. + +.. _pytest-remotedata: https://pypi.org/project/pytest-remotedata/ + +Support in `matplotlib.testing` 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 +``sys.modules``). + +``testing.is_called_from_pytest`` is deprecated. + +During the deprecation period, to force the generation of nose base tests, +import nose first. + +The ``switch_backend_warn`` parameter to ``matplotlib.test`` has no effect and +is deprecated. + +``testing.jpl_units.UnitDbl.UnitDbl.checkUnits`` is deprecated. + +Misc +~~~~ +``matplotlib.get_home`` is deprecated (use e.g. ``os.path.expanduser("~")``) +instead. + +``matplotlib.compare_versions`` is deprecated (use comparison of +``distutils.version.LooseVersion``\s instead). + +``matplotlib.checkdep_ps_distiller`` is deprecated. + +``matplotlib.figure.AxesStack`` is considered private API and will be removed +from the public API in future versions. diff --git a/doc/api/next_api_changes/2019-01-02-AL.rst b/doc/api/prev_api_changes/api_changes_3.2.0/development.rst similarity index 63% rename from doc/api/next_api_changes/2019-01-02-AL.rst rename to doc/api/prev_api_changes/api_changes_3.2.0/development.rst index 7af8293d16b9..1322051f4618 100644 --- a/doc/api/next_api_changes/2019-01-02-AL.rst +++ b/doc/api/prev_api_changes/api_changes_3.2.0/development.rst @@ -1,6 +1,8 @@ -Changes to the Windows build -```````````````````````````` +Development changes +------------------- +Windows build +~~~~~~~~~~~~~ Previously, when building the :mod:`matplotlib._png` extension, the build script would add "png" and "z" to the extensions ``.libraries`` attribute (if pkg-config information is not available, which is in particular the case on @@ -17,3 +19,13 @@ Instead, on Windows, we now look up ``libpng16.lib`` and ``zlib.lib``, which For a statically-linked build, the upstream names are ``libpng16_static.lib`` and ``zlibstatic.lib``; one still needs to manually rename them if such a build is desired. + +Packaging DLLs +~~~~~~~~~~~~~~ +Previously, it was possible to package Windows DLLs into the Maptlotlib +wheel (or sdist) by copying them into the source tree and setting the +``package_data.dlls`` entry in ``setup.cfg``. + +DLLs copied in the source tree are now always packaged; the +``package_data.dlls`` entry has no effect anymore. If you do not want to +include the DLLs, don't copy them into the source tree. diff --git a/doc/api/next_api_changes/2019-05-18-AL.rst b/doc/api/prev_api_changes/api_changes_3.2.0/removals.rst similarity index 56% rename from doc/api/next_api_changes/2019-05-18-AL.rst rename to doc/api/prev_api_changes/api_changes_3.2.0/removals.rst index 7c19834f6ddd..6741d5e467a2 100644 --- a/doc/api/next_api_changes/2019-05-18-AL.rst +++ b/doc/api/prev_api_changes/api_changes_3.2.0/removals.rst @@ -1,61 +1,74 @@ -API removals -```````````` +Removals +-------- +The ``matplotlib.testing.determinism`` module, which exposes no public API, has +been deleted. -The following deprecated APIs were removed: +The following API elements have been removed: +- ``backend_gtk3.PIXELS_PER_INCH`` +- ``backend_pgf.re_escapetext``, ``backend_pgf.re_mathdefault``. - the ``matplotlib.backends.tkagg``, ``matplotlib.backends.windowing``, ``matplotlib.backends.wx_compat``, and ``matplotlib.compat.subprocess`` - modules, + modules - ``RcParams.msg_depr``, ``RcParams.msg_depr_ignore``, ``RcParams.msg_depr_set``, ``RcParams.msg_obsolete``, - ``RcParams.msg_backend_obsolete``, -- ``afm.parse_afm`` (use ``afm.AFM instead``), -- ``axes.Axes.mouseover_set``, -- ``backend_cairo.ArrayWrapper``, ``backend_cairo.RendererCairo.convert_path``, + ``RcParams.msg_backend_obsolete`` +- ``afm.parse_afm`` (use ``afm.AFM instead``) +- ``axes.Axes.mouseover_set`` +- ``backend_cairo.ArrayWrapper``, ``backend_cairo.RendererCairo.convert_path`` - ``backend_gtk3.FileChooserDialog.sorted_filetypes`` (use - ``sorted(self.filetypes.items())`` instead), -- ``backend_pgf.get_texcommand``, -- ``backend_pdf.PdfFile.texFontMap``, -- ``backend_ps.get_bbox``, + ``sorted(self.filetypes.items())`` instead) +- ``backend_pgf.get_texcommand`` +- ``backend_pdf.PdfFile.texFontMap`` +- ``backend_ps.get_bbox`` - ``backend_qt.FigureCanvasQt.keyAutoRepeat`` (use ``event.guiEvent.isAutoRepeat`` instead), ``backend_qt.error_msg_qt``, - ``backend_qt.exception_handler``, -- ``backend_wx.FigureCanvasWx.macros``, -- ``backends.pylab_setup``, + ``backend_qt.exception_handler`` +- ``backend_wx.FigureCanvasWx.macros`` +- ``backends.pylab_setup`` - ``cbook.Bunch`` (use ``types.SimpleNamespace`` instead), ``cbook.Locked``, ``cbook.unicode_safe``, ``cbook.is_numlike`` (use ``isinstance(..., numbers.Number)`` instead), ``cbook.mkdirs`` (use ``os.makedirs(..., exist_ok=True)`` instead), ``cbook.GetRealpathAndStat`` (use ``cbook.get_realpath_and_stat`` instead), - ``cbook.listFiles``, -- ``container.Container.set_remove_method``, + ``cbook.listFiles`` +- ``container.Container.set_remove_method`` - ``contour.ContourLabeler.cl``, ``contour.ContourLabeler.cl_xy``, ``contour.ContourLabeler.cl_cvalues`` (use ``labelTexts``, ``labelXYs``, - ``labelCValues`` instead), -- ``dates.DateFormatter.strftime``, ``dates.DateFormatter.strftime_pre_1900``, + ``labelCValues`` instead) +- ``dates.DateFormatter.strftime``, ``dates.DateFormatter.strftime_pre_1900`` - ``font_manager.TempCache``, ``font_manager.FontManager.ttffiles``, - ``font_manager.FontManager.afmfiles``, -- ``mathtext.unichr_safe`` (use ``chr`` instead), -- ``patches.YAArrow`` (use ``patches.FancyArrowPatch`` instead), -- ``sphinxext.plot_directive.remove_coding``, -- ``table.Table.get_child_artists``, + ``font_manager.FontManager.afmfiles`` +- ``mathtext.unichr_safe`` (use ``chr`` instead) +- ``patches.YAArrow`` (use ``patches.FancyArrowPatch`` instead) +- ``sphinxext.plot_directive.remove_coding`` +- ``table.Table.get_child_artists`` - ``testing.compare.compare_float``, ``testing.decorators.CleanupTest``, ``testing.decorators.ImageComparisonTest``, ``testing.decorators.skip_if_command_unavailable``, - support for nose-based tests, -- ``text.Annotation.arrow`` (use ``text.Annotation.arrow_patch`` instead), -- ``textpath.TextToPath.tex_font_map``, -- ``ticker.Base``, ``ticker.closeto``, ``ticker.nearest_long``, + support for nose-based tests +- ``text.Annotation.arrow`` (use ``text.Annotation.arrow_patch`` instead) +- ``textpath.TextToPath.tex_font_map`` +- ``ticker.Base``, ``ticker.closeto``, ``ticker.nearest_long`` - ``axes_grid1.axes_divider.LocatableAxesBase``, ``axes_grid1.axes_divider.locatable_axes_factory``, ``axes_grid1.axes_divider.Axes`` (use ``axes_grid1.mpl_axes.Axes`` instead), ``axes_grid1.axes_divider.LocatableAxes`` (use ``axes_grid1.mpl_axes.Axes`` - instead), + instead) - ``axisartist.axes_divider.Axes``, ``axisartist.axes_divider.LocatableAxes`` - (use ``axisartist.axislines.Axes`` instead), -- the ``normed`` kwarg to ``hist`` (use ``density`` instead), -- the ``verts`` parameter to ``scatter`` (use ``marker`` instead), + (use ``axisartist.axislines.Axes`` instead) +- the ``normed`` kwarg to ``hist`` (use ``density`` instead) +- the ``verts`` parameter to ``scatter`` (use ``marker`` instead) - passing ``(verts, 0)`` or ``(..., 3)`` when specifying a marker to specify a path or a circle, respectively (instead, use ``verts`` or ``"o"``, - respectively), -- :rc:`examples.directory`, + respectively) +- :rc:`examples.directory` + +The following members of ``matplotlib.backends.backend_pdf.PdfFile`` were removed: + +- ``nextObject`` +- ``nextFont`` +- ``nextAlphaState`` +- ``nextHatch`` +- ``nextImage`` +- ``alphaStateObject``