-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Pending warning for deprecated parameter 'vert' of box and violin on 3.10 #29159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would have expected 3.10 here („pending depreciation in 3.10“) but am not sure what the message looks like („deprecated in 3.11“) would also be fine. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The version number actually does not appear in the Pending deprecation, apparently:
Personally I think this is fine, and leaving the intended deprecation version in source reduces change when actually deprecating (though in this case, it is already fully deprecated on main, so that much doesn't really matter) |
||
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) | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.