Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8f95256

Browse files
timhoffmanntzer
authored andcommitted
More alternatives in API changes
1 parent 66cb7bb commit 8f95256

File tree

2 files changed

+25
-12
lines changed

2 files changed

+25
-12
lines changed

doc/api/next_api_changes/2018-09-18-AL-removals.rst

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,43 @@ The following deprecated APIs were removed:
55

66
Classes and methods
77
-------------------
8-
- ``Verbose``
9-
- ``artist.Artist.hitlist``
8+
- ``Verbose`` (replaced by python logging library)
9+
- ``artist.Artist.hitlist`` (no replacement)
1010
- ``artist.Artist.is_figure_set`` (use ``artist.figure is not None`` instead)
1111
- ``axis.Axis.unit_data`` (use ``axis.Axis.units`` instead)
12-
- ``backend_bases.FigureCanvasBase.onRemove``
12+
- ``backend_bases.FigureCanvasBase.onRemove`` (no replacement)
1313
``backend_bases.FigureManagerBase.show_popup`` (this never did anything)
14-
- ``backend_wx.SubplotToolWx``, ``backend_wx.Toolbar``
15-
- ``cbook.align_iterators``
16-
- ``contour.ContourLabeler.get_real_label_width``
14+
- ``backend_wx.SubplotToolWx`` (no replacement)
15+
- ``backend_wx.Toolbar`` (use ``backend_wx.NavigationToolbar2Wx`` instead)
16+
- ``cbook.align_iterators`` (no replacment)
17+
- ``contour.ContourLabeler.get_real_label_width`` (no replacement)
1718
- ``legend.Legend.draggable`` (use `legend.Legend.set_draggable()` instead)
1819
- ``texmanager.TexManager.postscriptd``, ``texmanager.TexManager.pscnt``,
1920
``texmanager.TexManager.make_ps``, ``texmanager.TexManager.get_ps_bbox``
21+
(no replacements)
2022

2123
Arguments
2224
---------
2325
- The ``fig`` kwarg to ``GridSpec.get_subplot_params`` and
24-
``GridSpecFromSubplotSpec.get_subplot_params``
25-
- Passing 'box-forced' to `axes.Axes.set_adjustable`
26-
- Support for the strings 'on'/'true'/'off'/'false' to mean ``True``/``False``
27-
the following functions are affected: `Axes.grid`, `Axes3D.grid`
28-
`Axis.set_tick_params`, `pyplot.box`)
26+
``GridSpecFromSubplotSpec.get_subplot_params`` (use the argument
27+
``figure`` instead)
28+
- Passing 'box-forced' to `axes.Axes.set_adjustable` (use 'box' instead)
29+
- Support for the strings 'on'/'true'/'off'/'false' to mean
30+
``True``/``False`` (directly use ``True``/``False`` instead).
31+
The following functions are affected: `Axes.grid`, `Axes3D.grid`
32+
`Axis.set_tick_params`, `pyplot.box`.
2933
- Using `pyplot.axes` with an `axes.Axes` type argument
3034
(use `pyplot.sca` instead)
3135

3236
Other
3337
-----
3438
- svgfont support (in :rc:`svg.fonttype`),
39+
- Logging is now done with the standard python ``logging`` library.
40+
``matplotlib.verbose`` and the command line switches ``--verbose-LEVEL`` are
41+
removed.
42+
43+
To control the logging output use::
44+
45+
import logging
46+
logger = logging.getLogger('matplotlib')
47+
logger.set_level(logging.INFO)

lib/matplotlib/axes/_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1504,7 +1504,7 @@ def apply_aspect(self, position=None):
15041504

15051505
figW, figH = self.get_figure().get_size_inches()
15061506
fig_aspect = figH / figW
1507-
if self._adjustable in ['box', 'box-forced']:
1507+
if self._adjustable == 'box':
15081508
if self in self._twinned_axes:
15091509
raise RuntimeError("Adjustable 'box' is not allowed in a"
15101510
" twinned Axes. Use 'datalim' instead.")

0 commit comments

Comments
 (0)