You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When NaN ends up in a histogram, you can't draw it. This should not stop us from fixing the TTreeFormula issue. Instead, we should devise a strategy to draw the histogram as best as we can, and putting a placeholder into the bins that contain NaN.
root [0] TH1D histo("histo", "histo", 10, 0, 10);
root [2] histo.SetBinContent(1, std::sqrt(-1));
root [3] histo.Fill(3)
root [4] histo.Draw()
Info in <TCanvas::MakeDefCanvas>: created default TCanvas with name c1
Warning in <TCanvas::ResizePad>: Inf/NaN propagated to the pad. Check drawn objects.
Warning in <TCanvas::ResizePad>: c1 height changed from 0 to 10
putting a placeholder into the bins that contain NaN.
Related discussion, it seems that with TTree Draw it works fine and the NaNs end up in the overflow bin #22756 (comment) but not with histograms where the content of a bin itself is NaN (in contrast to the x value being nan).
It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise.
It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise.
It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise.
It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise.
It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise.
Activity
hageboeck commentedon Aug 21, 2026
ferdymercury commentedon Aug 21, 2026
Related discussion, it seems that with TTree Draw it works fine and the NaNs end up in the overflow bin #22756 (comment) but not with histograms where the content of a bin itself is NaN (in contrast to the x value being nan).
[hist] skip nan/inf bin contents when calculating Y hist range
[hist] skip nan/inf bin contents when calculating Y hist range
github-actions commentedon Aug 27, 2026
Hi @dpiparo, @hageboeck,
It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise.
Sincerely,
🤖
github-actions commentedon Aug 28, 2026
Hi @dpiparo, @hageboeck,
It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise.
Sincerely,
🤖
github-actions commentedon Aug 31, 2026
Hi @dpiparo, @hageboeck,
It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise.
Sincerely,
🤖
github-actions commentedon Sep 1, 2026
Hi @dpiparo, @hageboeck,
It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise.
Sincerely,
🤖
github-actions commentedon Sep 2, 2026
Hi @dpiparo, @hageboeck,
It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise.
Sincerely,
🤖
[hist] skip nan/inf bin contents when calculating Y hist range
[hist] skip nan/inf bin contents when calculating Y hist range