Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.1k
Addorientation parameter to Boxplot and deprecatevert#28074
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
oscargus left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Will only leave comments for now, but in general looks OK once the tests are passing.
- Replace
vertwithorientationin the failing tests (you have added a similarity test for the transition period, so makes sense to update the old ones) - Not sure how the discussion w.r.t. the rcParam went, but I think it makes sense to deprecate that as well. Not sure what the path is there though...
boxplot.vertical
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
saranti commentedApr 27, 2024
That test is passing on my end, I don't know what the problem is 🤔 |
rcomer commentedApr 27, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Looks like the test just timed out. Let’s see if a re-spin helps… Edit: apparently not. |
Uh oh!
There was an error while loading.Please reload this page.
saranti commentedMay 3, 2024
|
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
bdcfc97 to3bc3735Compare
timhoffm left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Modulo two documentation suggestions.
Thanks@saranti!
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
rcomer left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thanks@saranti, this is looking great!
It took me a while to get my head around why we are not warning whenvert=True is explicitly passed. I guess it's because it's too complicated to do forbxp as we can't tell whether it came from the rcParam. However would it be worth adding an extra warning inboxplotspecifically for whenvert=True? Apologies if I've missed some discussion on this somewhere.
lib/matplotlib/tests/test_axes.py Outdated
| np.random.lognormal(mean=1.25,sigma=1.,size=(37,4)),**stats_kwargs) | ||
| fig,ax=plt.subplots() | ||
| ifbxp_kwargs.get('vert',True): | ||
| ifnotbxp_kwargs.get('orientation')orbxp_kwargs.get('orientation')=='vertical': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
| ifnotbxp_kwargs.get('orientation')orbxp_kwargs.get('orientation')=='vertical': | |
| ifbxp_kwargs.get('orientation','vertical')=='vertical': |
Defines a default and so avoids callingget twice.
timhoffm commentedMay 12, 2024
Good catch. Since we have the tri-state True/False/None, we can detect whenever True/False was passed explicitly. If we push rcParams resolution down to |
rcomer commentedMay 12, 2024
That would mean the rcParam affects cases where the user calls |
rcomer commentedMay 12, 2024
Could we also set the rcParam in the default matplotlibrc to matplotlib/lib/matplotlib/__init__.py Line 646 in46b39ab
If I have understood, that would mean we get the warning if the rcParam is explicitly set to either |
timhoffm commentedMay 12, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Indeed. But it would only affect Re rcParam None: I have not been able / spent enough time to fully understand the mechanics (see#28074 (comment)) but the solution there to warn on rcParam readout seems good enough. We only don't warn if you configure the rcParam explicitly to True (but why would one do that when it's the default behavior anyway). |
saranti commentedMay 14, 2024
I didn't see any reason why the |
ca45848 to0f7a522Compare
Uh oh!
There was an error while loading.Please reload this page.
PR summary
Closes#13435 together with PR#27998.
Replace the vert: bool parameter with orientation : {'vertical', 'horizontal'}. Changes are very similar to the work done on#27998 and most of it works interchangeably.
PR checklist