-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
1st Hackathon: the FixhathonThis issue can be tackled at a ROOT fixathonThis issue can be tackled at a ROOT fixathonaffects:masterbuggood first issuein:Graphics
Description
Check duplicate issues.
- Checked for duplicates
Description
Assume one only uses TH2::AddBinContent to fill a 2D histogram.
Then you draw it with COLZ.
Resulting canvas is empty.
In contrast, if you do the same with TH1::AddBinContent, it works without problems.
Reproducer
auto h2 = new TH2I("h2", "h2", 10, 0, 1, 2, 0, 2);
h2->AddBinContent(16,5);
h2->Draw("COLZ");
Nothing happens now, canvas is empty.
You are forced to:
h2->SetEntries(1)
gPad->Modified();
gPad->Update();
In contrast, with TH1, all works fine without calling SetEntries:
auto h = new TH1I("h", "h", 10, 0, 1);
h->AddBinContent(3,5)
h->Draw()
ROOT version
ROOT v6.30/02
Built for linuxx8664gcc on Nov 27 2023, 19:50:38
From tags/v6-30-02@
With c++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Binary directory: /opt/root/bin
Installation method
Binary
Operating system
Ubuntu 22.04
Additional context
No response
Metadata
Metadata
Assignees
Labels
1st Hackathon: the FixhathonThis issue can be tackled at a ROOT fixathonThis issue can be tackled at a ROOT fixathonaffects:masterbuggood first issuein:Graphics
Type
Projects
Status
Done