diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index f6a4ebfdc7c6..af5173d2503e 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -3875,9 +3875,11 @@ def boxplot(self, x, notch=None, sym=None, vert=None, control is provided by the *flierprops* parameter. vert : bool, optional - .. deprecated:: 3.10 + .. deprecated:: 3.11 Use *orientation* instead. + This is a pending deprecation for 3.10, with full deprecation + in 3.11 and removal in 3.13. If this is given during the deprecation period, it overrides the *orientation* parameter. @@ -4222,9 +4224,11 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=None, The default is ``0.5*(width of the box)``, see *widths*. vert : bool, optional - .. deprecated:: 3.10 + .. deprecated:: 3.11 Use *orientation* instead. + This is a pending deprecation for 3.10, with full deprecation + in 3.11 and removal in 3.13. If this is given during the deprecation period, it overrides the *orientation* parameter. @@ -4361,9 +4365,10 @@ def merge_kw_rc(subkey, explicit, zdelta=0, usemarker=True): vert = mpl.rcParams['boxplot.vertical'] else: _api.warn_deprecated( - "3.10", + "3.11", name="vert: bool", - alternative="orientation: {'vertical', 'horizontal'}" + alternative="orientation: {'vertical', 'horizontal'}", + pending=True, ) if vert is False: orientation = 'horizontal' @@ -8642,10 +8647,11 @@ def violin(self, vpstats, positions=None, vert=None, # vert takes precedence. if vert is not None: _api.warn_deprecated( - "3.10", + "3.11", name="vert: bool", - alternative="orientation: {'vertical', 'horizontal'}" - ) + alternative="orientation: {'vertical', 'horizontal'}", + pending=True, + ) orientation = 'vertical' if vert else 'horizontal' _api.check_in_list(['horizontal', 'vertical'], orientation=orientation) diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py index 6fe57a3e0d03..ee6f715c3ccd 100644 --- a/lib/matplotlib/tests/test_axes.py +++ b/lib/matplotlib/tests/test_axes.py @@ -9315,7 +9315,9 @@ def test_violinplot_orientation(fig_test, fig_ref): # Compare images between a figure that # uses vert and one that uses orientation. ax_ref = fig_ref.subplots() - ax_ref.violinplot(all_data, vert=False) + + with pytest.warns(PendingDeprecationWarning, match='vert: bool'): + ax_ref.violinplot(all_data, vert=False) ax_test = fig_test.subplots() ax_test.violinplot(all_data, orientation='horizontal')