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

[hist] paint TH2 even if nEntries==0, as already happens for TH1 #17548

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ferdymercury
Copy link
Contributor

@ferdymercury ferdymercury commented Jan 28, 2025

This Pull request:

Changes or fixes:

If you fill a TH1 using only AddBinContent, the resulting nEntries=0, and call Draw(), it works. If you fill a TH2 using only AddBinContent, the resulting nEntries=0, and call Draw("COLZ"), it does not work. This commit tries to fix it so that it also works for the 2D case, for consistency.

Fixes #14153

Checklist:

  • tested changes locally
  • updated the docs (if necessary)

Fixes root-project#14153

If you fill a TH1 using only AddBinContent, the resulting nEntries=0, and call Draw(), it works.
If you fill a TH2 using only AddBinContent, the resulting nEntries=0, and call Draw("COLZ"), it does not work.
This commit tries to fix it so that it also works.
Copy link

Test Results

    18 files      18 suites   3d 23h 14m 23s ⏱️
 2 683 tests  2 682 ✅ 0 💤 1 ❌
46 598 runs  46 597 ✅ 0 💤 1 ❌

For more details on these failures, see this check.

Results for commit cc21998.

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

Successfully merging this pull request may close these issues.

TH2 not drawn if only TH2::AddBinContent is called (Entries=0). For TH1 it works.
2 participants