diff --git a/lib/matplotlib/axes.py b/lib/matplotlib/axes.py index 77c493c4bd22..f59904aba2b3 100644 --- a/lib/matplotlib/axes.py +++ b/lib/matplotlib/axes.py @@ -6281,7 +6281,8 @@ def scatter(self, x, y, s=20, c='b', marker='o', cmap=None, norm=None, edgecolors = kwargs.get('edgecolors', None) if faceted is not None: cbook.warn_deprecated( - '1.2', 'faceted', alternative='edgecolor', obj_type='option') + '1.2', name='faceted', alternative='edgecolor', + obj_type='option') if faceted: edgecolors = None else: @@ -7537,7 +7538,8 @@ def pcolor(self, *args, **kwargs): vmax = kwargs.pop('vmax', None) if 'shading' in kwargs: cbook.warn_deprecated( - '1.2', 'shading', alternative='edgecolors', obj_type='option') + '1.2', name='shading', alternative='edgecolors', + obj_type='option') shading = kwargs.pop('shading', 'flat') X, Y, C = self._pcolorargs('pcolor', *args, allmatch=False) diff --git a/lib/matplotlib/cbook.py b/lib/matplotlib/cbook.py index b825e83507f4..be07d01c093c 100644 --- a/lib/matplotlib/cbook.py +++ b/lib/matplotlib/cbook.py @@ -117,7 +117,7 @@ def new_function(): The object type being deprecated. """ message = _generate_deprecation_message( - since, message, name, alternative, pending, 'function') + since, message, name, alternative, pending, obj_type) warnings.warn(message, mplDeprecation, stacklevel=1) diff --git a/lib/matplotlib/mpl.py b/lib/matplotlib/mpl.py index 2049ad9e2246..bbcc0de2856d 100644 --- a/lib/matplotlib/mpl.py +++ b/lib/matplotlib/mpl.py @@ -4,7 +4,7 @@ import warnings from matplotlib import cbook cbook.warn_deprecated( - '1.3', 'matplotlib.mpl', alternative='`import matplotlib as mpl`', + '1.3', name='matplotlib.mpl', alternative='`import matplotlib as mpl`', obj_type='module') from matplotlib import artist from matplotlib import axis