Skip to content

Add a "density" kwarg to hist2d #11070

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
dstansby opened this issue Apr 17, 2018 · 9 comments
Closed

Add a "density" kwarg to hist2d #11070

dstansby opened this issue Apr 17, 2018 · 9 comments
Labels
API: consistency Good first issue Open a pull request against these issues if there are no active ones!
Milestone

Comments

@dstansby
Copy link
Member

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.

@tacaswell tacaswell added this to the v3.0 milestone Apr 17, 2018
@dstansby dstansby added the Good first issue Open a pull request against these issues if there are no active ones! label Apr 17, 2018
@dstansby
Copy link
Member Author

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

@vermashresth
Copy link

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

@jklymak
Copy link
Member

jklymak commented Apr 23, 2018

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...

@vermashresth
Copy link

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

@jklymak
Copy link
Member

jklymak commented Apr 24, 2018

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

@dstansby
Copy link
Member Author

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

@anntzer
Copy link
Contributor

anntzer commented Sep 18, 2018

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.

@anntzer anntzer reopened this Sep 18, 2018
@anntzer anntzer modified the milestones: v3.0, v3.1 Sep 18, 2018
thoo added a commit to thoo/matplotlib that referenced this issue Oct 7, 2018
thoo added a commit to thoo/matplotlib that referenced this issue Oct 7, 2018
thoo added a commit to thoo/matplotlib that referenced this issue Oct 7, 2018
@thoo
Copy link
Contributor

thoo commented Oct 7, 2018

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.

thoo added a commit to thoo/matplotlib that referenced this issue Oct 16, 2018
thoo added a commit to thoo/matplotlib that referenced this issue Oct 16, 2018
@tacaswell tacaswell modified the milestones: v3.1.0, v3.2.0 Mar 18, 2019
@anntzer
Copy link
Contributor

anntzer commented Mar 19, 2019

Closed by #13128.

@anntzer anntzer closed this as completed Mar 19, 2019
@anntzer anntzer modified the milestones: v3.2.0, v3.1.0 Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API: consistency Good first issue Open a pull request against these issues if there are no active ones!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants