diff --git a/doc/api/api_changes.rst b/doc/api/api_changes.rst index 1ff1e66734e2..4efd112cb81b 100644 --- a/doc/api/api_changes.rst +++ b/doc/api/api_changes.rst @@ -154,8 +154,9 @@ Different exception types for undocumented options and ``right`` arguments. :meth:`~matplotlib.axes.Axes.set_ylim` and the 3D equivalents (e.g. :meth:`~mpl_toolkits.axes.Axes3D.set_zlim3d`) had a corresponding problem. - The ``_min`` and ``_max`` arguments are now deprecated, and a ``TypeError`` - will be raised if they would override the earlier limit arguments. + A ``TypeError`` will be raised if they would override the earlier + limit arguments. In 3.0 these were kwargs were deprecated, but in 3.1 + the deprecation was undone. Improved call signature for ``Axes.margins`` diff --git a/doc/api/next_api_changes/2018-01-28_tac.rst b/doc/api/next_api_changes/2018-01-28_tac.rst new file mode 100644 index 000000000000..50dae92a833c --- /dev/null +++ b/doc/api/next_api_changes/2018-01-28_tac.rst @@ -0,0 +1,5 @@ +De-deprecate xmin, xmax kwargs to set_xlim and ymin, ymax kwargs to set_ylim +```````````````````````````````````````````````````````````````````````````` + +These kwargs were deprecated in 3.0, but due to user feedback and the +semantics of the new names are problematic for non-rectangular axes. diff --git a/lib/matplotlib/axes/_base.py b/lib/matplotlib/axes/_base.py index 9515e03e5d75..59ac04741a3d 100644 --- a/lib/matplotlib/axes/_base.py +++ b/lib/matplotlib/axes/_base.py @@ -3145,8 +3145,7 @@ def set_xlim(self, left=None, right=None, emit=True, auto=False, False turns off (default action), None leaves unchanged. xmin, xmax : scalar, optional - These arguments are deprecated and will be removed in a future - version. They are equivalent to left and right respectively, + They are equivalent to left and right respectively, and it is an error to pass both *xmin* and *left* or *xmax* and *right*. @@ -3188,14 +3187,10 @@ def set_xlim(self, left=None, right=None, emit=True, auto=False, if right is None and np.iterable(left): left, right = left if xmin is not None: - cbook.warn_deprecated('3.0', name='`xmin`', - alternative='`left`', obj_type='argument') if left is not None: raise TypeError('Cannot pass both `xmin` and `left`') left = xmin if xmax is not None: - cbook.warn_deprecated('3.0', name='`xmax`', - alternative='`right`', obj_type='argument') if right is not None: raise TypeError('Cannot pass both `xmax` and `right`') right = xmax @@ -3529,8 +3524,7 @@ def set_ylim(self, bottom=None, top=None, emit=True, auto=False, *False* turns off (default action), *None* leaves unchanged. ymin, ymax : scalar, optional - These arguments are deprecated and will be removed in a future - version. They are equivalent to bottom and top respectively, + They are equivalent to bottom and top respectively, and it is an error to pass both *ymin* and *bottom* or *ymax* and *top*. @@ -3571,14 +3565,10 @@ def set_ylim(self, bottom=None, top=None, emit=True, auto=False, if top is None and np.iterable(bottom): bottom, top = bottom if ymin is not None: - cbook.warn_deprecated('3.0', name='`ymin`', - alternative='`bottom`', obj_type='argument') if bottom is not None: raise TypeError('Cannot pass both `ymin` and `bottom`') bottom = ymin if ymax is not None: - cbook.warn_deprecated('3.0', name='`ymax`', - alternative='`top`', obj_type='argument') if top is not None: raise TypeError('Cannot pass both `ymax` and `top`') top = ymax