You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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...
@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?
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.
Activity
dstansby commentedon Apr 17, 2018
If anyone wants to have a go at this, #8993 and #9889 show what was done to
ax.histto make this change.vermashresth commentedon Apr 23, 2018
Hi @dstansby, I would like to do this. This PR is for both replacing and depreciating, right?
jklymak commentedon Apr 23, 2018
I think you need to deprecate the
normedkwarg, and add adensitykwarg and make it compatible w/ numpy. Don't remove thenormedkwarg... Not 100% sure ifnormedanddensityare meant to do exactly the same thing...vermashresth commentedon Apr 24, 2018
@dstansby @jklymak I noticed that
np.histogramfunction of numpy has newer kwargs with depreciatednormedargument butnp.histogram2d(here) still works onnormedand notdensity. How do we replace the arguments forax.hist2dthen?jklymak commentedon Apr 24, 2018
I’d argue for consistency with numpy. If they don’t used notmed I guess we shouldn’t.
dstansby commentedon Apr 24, 2018
Agree with @jklymak (maybe I should convince numpy should change for API consistency 😉 )
anntzer commentedon 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.
Add a "density" kwarg to hist2d matplotlib#11070
Add a "density" kwarg to hist2d matplotlib#11070
Add a "density" kwarg to hist2d matplotlib#11070
thoo commentedon 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.
Add a "density" kwarg to hist2d matplotlib#11070
Add a "density" kwarg to hist2d matplotlib#11070
anntzer commentedon Mar 19, 2019
Closed by #13128.