-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fix documentation for xerr and yerr arguments in _axes.py #11160
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
Conversation
Documentation for xerr and yerr arguments when they are of shape(2,N) in the bar, barh, and errorbar methods suggests that '+' values are first row while '-' values are second row. The opposite is actually true -- documentation has been changed to more explicitly convey use of xerr and yerr.
lib/matplotlib/axes/_axes.py
Outdated
@@ -1873,7 +1873,7 @@ def bar(self, x, height, width=0.8, bottom=None, *, align="center", | |||
|
|||
- scalar: symmetric +/- values for all bars | |||
- shape(N,): symmetric +/- values for each bar | |||
- shape(2,N): separate + and - values for each bar | |||
- shape(2,N): First row lower errors, second row upper errors. |
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.
Not a fan of the phrasing here, particularly given the line just before. Also, the other entryes don't have a capital at the beginning.
- shape(2,N): separate +/- values for each bar, the first row contains the - value.
#11161 was put in a few minutes later than yours, but has a more complete solution. Would you be horribly offended if we closed this just to keep things simple? |
Changes to the phrasing of xerr and yerr arguments have been made to better match preceding documentation of the same arguments.
Changes to the phrasing of xerr and yerr arguments have been made to better match preceding documentation of the same arguments.
OK, thanks a lot for the help! Usually we don't have such quick uptake on issues 😉 |
@jklymak No, please go with the best solution. It's what everyone wants and needs. |
Oh I was still confused by this. I spent one hour to find the problem today. You only changed BUT I just looked at the first two lines and thought they will be the same:
Why don't you change all the +/- into -/+ since it does not matter for the scalar and shape(N,) case? |
@Clear-up still not following what you were confused by. This PR never got merged Please open a new issue. |
PR Summary
From issue #11156, documentation for xerr and yerr arguments when they are of shape(2,N) in the bar, barh, and errorbar methods suggests that '+' values are first row while '-' values are second row. The opposite is actually true -- documentation has been changed to more explicitly convey use of xerr and yerr.
PR Checklist