8000 Merge pull request #26330 from anntzer/agaa · randomrahulm/matplotlib@c6db591 · GitHub
[go: up one dir, main page]

Skip to content

Commit c6db591

Browse files
authored
Merge pull request matplotlib#26330 from anntzer/agaa
Deprecate wrappers combining axes_grid1 and axisartist.
2 parents 840a6fe + 08abb1e commit c6db591

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
``axisartist.axes_grid`` and ``axisartist.axes_rgb``
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
These modules, which provide wrappers combining the functionality of
4+
`.axes_grid1` and `.axisartist`, are deprecated; directly use e.g.
5+
``AxesGrid(..., axes_class=axislines.Axes)`` instead.

lib/mpl_toolkits/axisartist/axes_grid.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
1+
from matplotlib import _api
2+
13
import mpl_toolkits.axes_grid1.axes_grid as axes_grid_orig
24
from .axislines import Axes
35

46

7+
_api.warn_deprecated(
8+
"3.8", name=__name__, obj_type="module", alternative="axes_grid1.axes_grid")
9+
10+
11+
@_api.deprecated("3.8", alternative=(
12+
"axes_grid1.axes_grid.Grid(..., axes_class=axislines.Axes"))
513
class Grid(axes_grid_orig.Grid):
614
_defaultAxesClass = Axes
715

816

17+
@_api.deprecated("3.8", alternative=(
18+
"axes_grid1.axes_grid.ImageGrid(..., axes_class=axislines.Axes"))
919
class ImageGrid(axes_grid_orig.ImageGrid):
1020
_defaultAxesClass = Axes
1121

lib/mpl_toolkits/axisartist/axes_rgb.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1+
from matplotlib import _api
12
from mpl_toolkits.axes_grid1.axes_rgb import ( # noqa
23
make_rgb_axes, RGBAxes as _RGBAxes)
34
from .axislines import Axes
45

56

7+
_api.warn_deprecated(
8+
"3.8", name=__name__, obj_type="module", alternative="axes_grid1.axes_rgb")
9+
10+
11+
@_api.deprecated("3.8", alternative=(
12+
"axes_grid1.axes_rgb.RGBAxes(..., axes_class=axislines.Axes"))
613
class RGBAxes(_RGBAxes):
714
"""
815
Subclass of `~.axes_grid1.axes_rgb.RGBAxes` with

0 commit comments

Comments
 (0)
0