From c9240f83c190b4e0b9baf167993667ea8a868504 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Tue, 10 Sep 2019 18:02:07 +0100 Subject: [PATCH 1/2] Move some new API changes to the correct place --- doc/api/next_api_changes/2018-09-06-AL.rst | 5 ----- doc/api/next_api_changes/2019-08-28-AL.rst | 8 -------- doc/api/prev_api_changes/api_changes_3.2.0/behavior.rst | 5 ++++- .../prev_api_changes/api_changes_3.2.0/deprecations.rst | 9 +++++++-- 4 files changed, 11 insertions(+), 16 deletions(-) delete mode 100644 doc/api/next_api_changes/2018-09-06-AL.rst delete mode 100644 doc/api/next_api_changes/2019-08-28-AL.rst diff --git a/doc/api/next_api_changes/2018-09-06-AL.rst b/doc/api/next_api_changes/2018-09-06-AL.rst deleted file mode 100644 index 3290fb264d6f..000000000000 --- a/doc/api/next_api_changes/2018-09-06-AL.rst +++ /dev/null @@ -1,5 +0,0 @@ -Deprecations -```````````` - -The ``renderer`` parameter to `.Figure.tight_layout` is deprecated; this method -now always uses the renderer instance cached on the `.Figure`. diff --git a/doc/api/next_api_changes/2019-08-28-AL.rst b/doc/api/next_api_changes/2019-08-28-AL.rst deleted file mode 100644 index 4787980630d8..000000000000 --- a/doc/api/next_api_changes/2019-08-28-AL.rst +++ /dev/null @@ -1,8 +0,0 @@ -PGF backend changes -``````````````````` - -The pgf backend now includes images using ``\includegraphics`` instead of -``\pgfimage`` if the version of ``graphicx`` is recent enough to support the -``interpolate`` option (this is detected automatically). - -``RendererPgf.latexManager`` is deprecated. 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 index fa9e224ff356..dcac1c948a2d 100644 --- 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 @@ -231,6 +231,10 @@ 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. +The pgf backend now includes images using ``\includegraphics`` instead of +``\pgfimage`` if the version of ``graphicx`` is recent enough to support the +``interpolate`` option (this is detected automatically). + `~matplotlib.cbook` ~~~~~~~~~~~~~~~~~~~ The default value of the "obj_type" parameter to ``cbook.warn_deprecated`` has @@ -260,4 +264,3 @@ package, and Axes methods that take a ``norm`` parameter. If extra kwargs are passed to `.LogScale`, `TypeError` will now be raised instead of `ValueError`. - 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 index 0dd7ee44c25e..0ce65b7014ab 100644 --- 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 @@ -139,6 +139,11 @@ Passing scalars to parameter *where* in ``fill_between()`` and broadcasted to the size of *x*. Non-matching sizes will raise a ``ValueError`` in the future. +``tight_layout()`` +~~~~~~~~~~~~~~~~~~ +The ``renderer`` parameter to `.Figure.tight_layout` is deprecated; this method +now always uses the renderer instance cached on the `.Figure`. + rcParams ~~~~~~~~ The ``rcsetup.validate_animation_writer_path`` function is deprecated. @@ -178,6 +183,8 @@ PGF ``backend_pgf.repl_escapetext`` and ``backend_pgf.repl_mathdefault`` are deprecated. +``RendererPgf.latexManager`` is deprecated. + FigureCanvas ~~~~~~~~~~~~ ``FigureCanvasBase.draw_cursor`` (which has never done anything and has never @@ -269,5 +276,3 @@ from the public API in future versions. ``style.core.is_style_file`` and ``style.core.iter_style_files`` are deprecated. - - From 79feb4cb4cd7236f03c5b353a2b46d568497e18a Mon Sep 17 00:00:00 2001 From: David Stansby Date: Tue, 10 Sep 2019 18:26:36 +0100 Subject: [PATCH 2/2] Move more API changes --- doc/api/next_api_changes/2019-02-25-AL.rst | 6 ---- doc/api/next_api_changes/2019-02-28-AL.rst | 26 -------------- .../api_changes_3.2.0/behavior.rst | 35 +++++++++++++++++++ 3 files changed, 35 insertions(+), 32 deletions(-) delete mode 100644 doc/api/next_api_changes/2019-02-25-AL.rst delete mode 100644 doc/api/next_api_changes/2019-02-28-AL.rst diff --git a/doc/api/next_api_changes/2019-02-25-AL.rst b/doc/api/next_api_changes/2019-02-25-AL.rst deleted file mode 100644 index 59b7de3e319a..000000000000 --- a/doc/api/next_api_changes/2019-02-25-AL.rst +++ /dev/null @@ -1,6 +0,0 @@ -API changes -``````````` - -When more than `.Locator.MAXTICKS` ticks are generated, the behavior of -`.Locator.raise_if_exceeds` changed from raising a RuntimeError to emitting a -log at WARNING level. diff --git a/doc/api/next_api_changes/2019-02-28-AL.rst b/doc/api/next_api_changes/2019-02-28-AL.rst deleted file mode 100644 index 1e7a99627f46..000000000000 --- a/doc/api/next_api_changes/2019-02-28-AL.rst +++ /dev/null @@ -1,26 +0,0 @@ -``Axes.label_outer``, ``Axes.is_last_row``, and ``Axes.is_last_col`` now work correctly for axes spanning multiple rows or columns -`````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````` - -``Axes.label_outer`` now correctly keep the x labels and tick labels visible -for Axes spanning multiple rows, as long as they cover the last row of the Axes -grid. (This is consistent with keeping the y labels and tick labels visible -for Axes spanning multiple columns as long as they cover the first column of -the Axes grid.) - -The ``Axes.is_last_row`` and ``Axes.is_last_col`` methods now correctly return -True for Axes spanning multiple rows, as long as they cover the last row or -column respectively. Again this is consistent with the behavior for axes -covering the first row or column. - -The ``Axes.rowNum`` and ``Axes.colNum`` attributes are deprecated, as they only -refer to the first grid cell covered by the Axes. Instead, use the new -``ax.get_subplotspec().rowspan`` and ``ax.get_subplotspec().colspan`` -properties, which are `range` objects indicating the whole span of rows and -columns covered by the subplot. - -(Note that all methods and attributes mentioned here actually only exist on -the ``Subplot`` subclass of `Axes`, which is used for grid-positioned Axes but -not for Axes positioned directly in absolute coordinates.) - -The `.GridSpec` class gained the ``nrows`` and ``ncols`` properties as more -explicit synonyms for the parameters returned by ``GridSpec.get_geometry``. 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 index dcac1c948a2d..f50fbe4ac15e 100644 --- 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 @@ -111,6 +111,41 @@ 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. + +Axes labels spanning multiple rows/columns +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +``Axes.label_outer`` now correctly keep the x labels and tick labels visible +for Axes spanning multiple rows, as long as they cover the last row of the Axes +grid. (This is consistent with keeping the y labels and tick labels visible +for Axes spanning multiple columns as long as they cover the first column of +the Axes grid.) + +The ``Axes.is_last_row`` and ``Axes.is_last_col`` methods now correctly return +True for Axes spanning multiple rows, as long as they cover the last row or +column respectively. Again this is consistent with the behavior for axes +covering the first row or column. + +The ``Axes.rowNum`` and ``Axes.colNum`` attributes are deprecated, as they only +refer to the first grid cell covered by the Axes. Instead, use the new +``ax.get_subplotspec().rowspan`` and ``ax.get_subplotspec().colspan`` +properties, which are `range` objects indicating the whole span of rows and +columns covered by the subplot. + +(Note that all methods and attributes mentioned here actually only exist on +the ``Subplot`` subclass of `Axes`, which is used for grid-positioned Axes but +not for Axes positioned directly in absolute coordinates.) + +The `.GridSpec` class gained the ``nrows`` and ``ncols`` properties as more +explicit synonyms for the parameters returned by ``GridSpec.get_geometry``. + + +Locators +~~~~~~~~ +When more than `.Locator.MAXTICKS` ticks are generated, the behavior of +`.Locator.raise_if_exceeds` changed from raising a RuntimeError to emitting a +log at WARNING level. + nonsingular Locators ~~~~~~~~~~~~~~~~~~~~ ``Locator.nonsingular`` (introduced in mpl 3.1), ``DateLocator.nonsingular``, and