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

Skip to content

Commit f5ce789

Browse files
committed
Delay warning for deprecated parameter 'vert' of box and violin
The new parameter, 'orientation', was only added in the current release, so downstream wanting to avoid warnings would require version gates. Therefore delaying by at least one release to ease the transition. This was motivated by Pandas failing tests on this warning.
1 parent 183b04f commit f5ce789

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3875,7 +3875,7 @@ def boxplot(self, x, notch=None, sym=None, vert=None,
38753875
control is provided by the *flierprops* parameter.
38763876
38773877
vert : bool, optional
3878-
.. deprecated:: 3.10
3878+
.. deprecated:: 3.11
38793879
Use *orientation* instead.
38803880
38813881
If this is given during the deprecation period, it overrides
@@ -4222,7 +4222,7 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=None,
42224222
The default is ``0.5*(width of the box)``, see *widths*.
42234223
42244224
vert : bool, optional
4225-
.. deprecated:: 3.10
4225+
.. deprecated:: 3.11
42264226
Use *orientation* instead.
42274227
42284228
If this is given during the deprecation period, it overrides
@@ -4361,9 +4361,10 @@ def merge_kw_rc(subkey, explicit, zdelta=0, usemarker=True):
43614361
vert = mpl.rcParams['boxplot.vertical']
43624362
else:
43634363
_api.warn_deprecated(
4364-
"3.10",
4364+
"3.11",
43654365
name="vert: bool",
4366-
alternative="orientation: {'vertical', 'horizontal'}"
4366+
alternative="orientation: {'vertical', 'horizontal'}",
4367+
pending=True,
43674368
)
43684369
if vert is False:
43694370
orientation = 'horizontal'
@@ -8642,10 +8643,11 @@ def violin(self, vpstats, positions=None, vert=None,
86428643
# vert takes precedence.
86438644
if vert is not None:
86448645
_api.warn_deprecated(
8645-
"3.10",
8646+
"3.11",
86468647
name="vert: bool",
8647-
alternative="orientation: {'vertical', 'horizontal'}"
8648-
)
8648+
alternative="orientation: {'vertical', 'horizontal'}",
8649+
pending=True,
8650+
)
86498651
orientation = 'vertical' if vert else 'horizontal'
86508652
_api.check_in_list(['horizontal', 'vertical'], orientation=orientation)
86518653

0 commit comments

Comments
 (0)