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

Skip to content

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

Closed
wants to merge 3 commits into from

Conversation

tropfcode
Copy link
Contributor

@tropfcode tropfcode commented May 2, 2018

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

  • Has Pytest style unit tests
  • [ X] Code is PEP 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

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.
@@ -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.
Copy link
Member

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.  

@jklymak jklymak mentioned this pull request May 2, 2018
2 tasks
@jklymak
Copy link
Member

jklymak commented May 2, 2018

#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?

tropfcode added 2 commits May 2, 2018 12:09
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.
@jklymak
Copy link
Member

jklymak commented May 2, 2018

OK, thanks a lot for the help! Usually we don't have such quick uptake on issues 😉

@jklymak jklymak closed this May 2, 2018
@tropfcode
Copy link
Contributor Author

@jklymak No, please go with the best solution. It's what everyone wants and needs.

@kaiwu-astro
Copy link

Oh I was still confused by this. I spent one hour to find the problem today.

You only changed
shape(2,N): Separate **- and +** values for each bar. First row

BUT I just looked at the first two lines and thought they will be the same:

scalar: Symmetric **+/-** values for all data points.
shape(N,): Symmetric **+/-**values for each data point.

Why don't you change all the +/- into -/+ since it does not matter for the scalar and shape(N,) case?

@jklymak
Copy link
Member

jklymak commented Sep 14, 2018

@Clear-up still not following what you were confused by. This PR never got merged Please open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants