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

Histogram stat box for "Entries" showing Integral instead Entries #320

Closed
msabbott21 opened this issue Oct 29, 2024 · 4 comments
Closed
Assignees
Labels

Comments

@msabbott21
Copy link

msabbott21 commented Oct 29, 2024

First, thank you so much for this extension, I use it nearly every day!!!

Bug report:
JSROOT version 7.7.4
el9_amd64_gcc12

I have some histograms that are filled with weights. For histograms that are filled only one time (see example attached), the stats box prints the Integral rather than the Entries. In this case, the stat box should show "Entries 1" instead of "Entries 0.001190820".

When calling hist.GetEntries() in pyroot, it correctly returns "1.0".
When printing the contents of the histogram directly using the terminal, it also correctly shows that Entries=1.
When creating a canvas with a statbox and saving that directly to a png, it also correctly shows that Entries=1.
So ROOT definitely considers Entries to be 1. This issue seems to stem from the JSROOT extension.

Example of incorrect statbox:
image

Let me know if there is any more information I can provide.

@linev
Copy link
Member

linev commented Oct 30, 2024

Thanks for reporting the problem.
For that ever reasons entries == 1 was handled wrong.
I will provide fix

linev added a commit that referenced this issue Oct 30, 2024
If not set - use from counted statistic
linev added a commit that referenced this issue Oct 30, 2024
If not set - use from counted statistic
linev added a commit that referenced this issue Oct 30, 2024
If not set - use from counted statistic
linev added a commit that referenced this issue Oct 30, 2024
If not set - use from counted statistic
@linev
Copy link
Member

linev commented Oct 30, 2024

I apply fix to master and 7.7 branch. Soon will be released with 7.7.5

@linev linev self-assigned this Oct 30, 2024
@linev linev added the bug label Oct 30, 2024
linev added a commit to linev/root that referenced this issue Oct 30, 2024
1. Fix - handle reordering of fragments in multipart reply root-project/jsroot#319
2. Fix - properly show non-zero entries root-project/jsroot#320
3. Fix - display empty hist bin if fSumw2 not zero
4. Fix - let use batch_mode script injection in interactive session
@msabbott21
Copy link
Author

thanks a bunch!

linev added a commit to root-project/root that referenced this issue Oct 31, 2024
1. Fix - handle reordering of fragments in multipart reply root-project/jsroot#319
2. Fix - properly show non-zero entries root-project/jsroot#320
3. Fix - display empty hist bin if fSumw2 not zero
4. Fix - let use batch_mode script injection in interactive session
@linev
Copy link
Member

linev commented Oct 31, 2024

@linev linev closed this as completed Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants