Skip to content
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

Add an option to sum over/underflow with the adjacent visible bins #337

Open
pieterdavid opened this issue Sep 21, 2021 · 1 comment
Open

Comments

@pieterdavid
Copy link

I didn't see any mention of this in the documentation, although it is reasonably common, and I think the plotting layer is the right place to do this (it seems more like a workaround elsewhere). Would a simple flag to histplot cover all common cases? Any preferences on naming? show_overflow is short, but may be found confusing... if I find a bit of time I'll try to implement this.

@andrzejnovak
Copy link
Member

I've been wondering about what to do with underflow/overflow for a while, especially what would be the right way to visualize it. I think we don't have to deal with the trivial case histplot(h.to_numpy(flow=True)...) but it would be good to have for hist or TH1s going in. Some thoughts I have are these:

  • by default, there should be some indication if there is flow, maybe an arrow?
  • I prefer shorter kwargs, flow seems to be used already in some context
  • Seems to me we have 4 cases
    • Nothing
    • Indicator
    • Sum
    • Display a new bin (maybe with a gap from the rest of the histogram?)
  • arguments could be
    • None/False
    • "hint" (default?)
    • "sum"/"add"
    • "show"/True

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants