-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Change hist behavior when normed and stacked to something more sensible #1833
Conversation
LGTM 👍 |
Just to confirm: Is this a change in the API in 1.2.x? If so, we probably should note that in the changelog. If this is a change to something that only ever existed on master, we shouldn't need to. |
I think the |
Is |
d2 = np.linspace(0, 10, 50) | ||
fig = plt.figure() | ||
ax = fig.add_subplot(111) | ||
ax.hist( (d1, d2), stacked=True, normed=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PEP8 : there should be no space inbetween the two parenthesis.
This does change the API, albeit an obscure corner of it. I think master is On Saturday, March 23, 2013, Damon McDougall wrote:
Sent from Gmail Mobile |
Rebased and fixed PEP8 issues. Hopefully this is good to go now. Sorry for the long delay. |
Just noticed this is still open. Is there anything else that needs to be done? |
That's for the ping. Looks fine to me. Would you mind rebasing so that Travis will run one more time as a sanity check before we merge? |
…rams rather than each histogram individually.
Just rebased. I get some font-related test failures, but those are probably unrelated. |
Change hist behavior when normed and stacked to something more sensible
This addresses #1745. Previously, when passed
stacked=True, normed=True
,hist
would normalize the histogram for each dataset, then stack them, which is, IMO, not what most users would want. With this PR,hist
will first stack the histograms, then normalize them such that the integral of the stacked histograms equals 1.