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

Skip to content

Update hist() docstring following removal of normed kwarg. #14604

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

Merged
merged 1 commit into from
Jun 29, 2019

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Jun 24, 2019

and change the default of density from None to False. (This doesn't
change anything from the API PoV as we convert the kwarg using bool
anyways, but the default was previously None for the sole purpose of
detecting when both normed and density were both passed and error
out in that case.)

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 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

Copy link
Member

@dstansby dstansby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 for slowly making the API more sane!

@dstansby dstansby added this to the v3.1.2 milestone Jun 24, 2019
@anntzer
Copy link
Contributor Author

anntzer commented Jun 24, 2019

very, very slowly :p

If *density* is also ``True`` then the histogram is normalized such
that the last bin equals 1.

If *cumulative* is to less than 0 (e.g., -1), the direction of
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If *cumulative* is to less than 0 (e.g., -1), the direction of
If *cumulative* is a number less than 0 (e.g., -1), the direction of

That should be mentioned in the type. Just bool is plain confusing. Maybe we could also deprecate numbers in favor of "reversed", but that's for another PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I now documented the type as bool or -1 which is technically too restrictive but more informative in practice, I think.

and change the default of density from None to False.  (This doesn't
change anything from the API PoV as we convert the kwarg using `bool`
anyways, but the default was previously `None` for the sole purpose of
detecting when both `normed` and `density` were both passed and error
out in that case.)
Copy link
Member

@timhoffm timhoffm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaving still open to see if anybody wants to comment on ngative number/-1.

@timhoffm timhoffm merged commit 1126912 into matplotlib:master Jun 29, 2019
@anntzer anntzer deleted the histdoc branch June 29, 2019 14:00
@QuLogic
Copy link
Member

QuLogic commented Jul 17, 2019

@meeseeksdev backport to v3.1.x

@tacaswell
Copy link
Member

This is documenting changes in #14244 which is targetting 3.2.

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

Successfully merging this pull request may close these issues.

5 participants