-
-
Notifications
You must be signed in to change notification settings - Fork 402
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
Improvements to histogram #1784
Conversation
The proposed changes sound good to me! Two quick comments: it would be good if #1783 is fixed first so we don't have to update display tests (but improve the linking behavior). Secondly, I don't think 'height' prefix conveys much in |
I think that is a much more substantial amount of work and should not hold up this PR. |
That is a good point. I'm just not sure about changing the display and then changing it back later. |
Maybe we can add an option to the histogram operation to control labelling with a plan on how it can solve our problems now with a plan for how we can deprecate it (or maybe it will still be useful?) once #1783 is merged? |
@jlstevens I don't know about just calling it "normalize" because there's already a "normed" parameter that normalizes the total integral of the histogram. That seems like it could be confusing. But I'll leave the naming up to you all. |
That is a good point. The problem I have looking at the docstrings for |
Thanks... that does clarify things! I am tempted to say there should be one @philippjfr What do you think? Could we do this without breaking backwards compatibility? |
I think people are used to passing |
* Fixed problems in rst links * Used pandoc to convert CHANGELOG to Markdown * Added CHANGELOG entry for 1.8.2
Right. If we make |
Looks like actually |
I think this does what we want now; I've just changed it so there's an option to pass 'height' or 'integral' to 'normed' in addition to a bool. |
Looks good! Though there seems to be failures in the unit tests. E.g:
|
I'd be happy to merge this as soon as that unit test has been resolved. I think it occurs when a weight_dimension is passed in which case |
OK, this should be good now... I corrected the bug and updated the tests to reflect the new dimension-naming scheme. |
Updated the test data and restarted the build, hopefully it will pass now and I can merge. |
Are we going to keep 'X Frequency' labels then? Or go back to simply 'Frequency' in 2.0 once axis linking can be done properly? I'm happy with the new normed option but I think that maybe the label change could be optional and not on by default... |
* Fixed installation page link in introduction * Added link to reference gallery in the introduction * Fixed remaining links in introduction guide * Fixed typo in tabular datasets getting started guide
I'd be happy with an option to pass a custom name for the frequency dimension. And then passing custom names would be the solution to the linking issue until the underlying issue is fixed. |
I'd say so yes, the histogram operation is most frequently used for adjoined histograms where the y-label is hidden anyway. I think in most other cases it's still a sensible label and we can decide to revert once the normalization system supports independent normalization of x- and y-axes. I'd also like to remove a workaround for the opts = dict(axiswise=True, framewise=True)
el = p.diagonal_operation(element, dimension=d1.name,
bin_range=bin_range).opts(norm=opts) should just become: el = p.diagonal_operation(element, dimension=d1.name, bin_range=bin_range) Still working on the fix for the other issue I mentioned. |
How about a I imagine people might have other words they might want to use for the value dimension other than 'frequency' so such a formatter might be useful regardless (instead of hard coding 'Frequency' into the dimension name). |
Okay, I'm going to make a branch of this PR and make some of the fixes to get the tests passing. |
Sorry I haven't been able to finish this up; been traveling and with other
commitments. Thanks for stepping in.
…On Fri, Aug 18, 2017 at 17:42 Philipp Rudiger ***@***.***> wrote:
Okay, I'm going to make a branch of this PR and make some of the fixes to
get the tests passing.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1784 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABzr2yw865ReLNO4PdXlcbAzRD6CIWWIks5sZbDIgaJpZM4OtQWx>
.
|
No problem at all, really it's not your mess to clean up, since it's a pre-existing bug (that's revealed by your changes) causing the test failures. |
Okay, now that JupyterCon is over I can finally look at this. I'll make a copy of this branch and then reopen a PR. |
Going to close this PR in favor of #1836, your commits will be preserved though @timothydmorton. |
Two updates to the histogram operation:
height_normed
parameter. This allows histograms to normalize their frequencies to unity, which is useful when overlaying two histograms that have significantly different frequency magnitudes.