Skip to content

Add a "density" kwarg to hist2d #11070

Closed
Closed

Description

@dstansby

Recently ax.hist got a density keyword argument to conform to numpy kwargs - it would be good if ax.hist2d could have it's normed argument replaced with a density argument for API consistency.

Activity

  1. added
    API: consistencyConsistency of the matplotlib API, including naming, behavior, defaults, …
    on Apr 17, 2018
  2. added this to the milestone on Apr 17, 2018
  3. added
    🌱 Good first issueOpen a pull request against these issues if there are no active ones!
    on Apr 17, 2018
  4. dstansby commented on Apr 17, 2018

    @dstansby
    MemberAuthor

    If anyone wants to have a go at this, #8993 and #9889 show what was done to ax.hist to make this change.

  5. vermashresth commented on Apr 23, 2018

    @vermashresth

    Hi @dstansby, I would like to do this. This PR is for both replacing and depreciating, right?

  6. jklymak commented on Apr 23, 2018

    @jklymak
    Member

    I think you need to deprecate the normed kwarg, and add a density kwarg and make it compatible w/ numpy. Don't remove the normed kwarg... Not 100% sure if normed and density are meant to do exactly the same thing...

  7. vermashresth commented on Apr 24, 2018

    @vermashresth

    @dstansby @jklymak I noticed that np.histogram function of numpy has newer kwargs with depreciated normed argument but np.histogram2d (here) still works on normed and not density. How do we replace the arguments for ax.hist2d then?

  8. jklymak commented on Apr 24, 2018

    @jklymak
    Member

    I’d argue for consistency with numpy. If they don’t used notmed I guess we shouldn’t.

  9. dstansby commented on Apr 24, 2018

    @dstansby
    MemberAuthor

    Agree with @jklymak (maybe I should convince numpy should change for API consistency 😉 )

  10. anntzer commented on Sep 18, 2018

    @anntzer
    Contributor

    numpy 1.15 introduced a 'density' kwarg to hist2d (numpy/numpy#11529). Even if we don't require numpy 1.15, we can always just introduce the 'density' kwarg and pass it as 'normed' to numpy.

  11. modified the milestones: v3.0, v3.1 on Sep 18, 2018
  12. thoo commented on Oct 7, 2018

    @thoo
    Contributor

    Hi All,
    I just submitted the pull request for this issue here. This is my first request and please let me know if something is missing.

  13. modified the milestones: v3.1.0, v3.2.0 on Mar 18, 2019
  14. anntzer commented on Mar 19, 2019

    @anntzer
    Contributor

    Closed by #13128.

  15. modified the milestones: v3.2.0, v3.1.0 on Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    API: consistencyConsistency of the matplotlib API, including naming, behavior, defaults, …🌱 Good first issueOpen a pull request against these issues if there are no active ones!

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions