I am using 3 different canvas to print 3 2D histograms. I am doing the same for declaring and drawing for all of three. Two are fine, but one canvas is completely blank (just white sheet).
Is there any problem that I am making but I am unaware of?
Here is that part of code.
TCanvas *Back = new TCanvas (“Background”,“Background_distri”,15,15,700,500);
TCanvas *Signal = new TCanvas (“Signal”,“Signal_distr”,15,15,700,500);
TCanvas *Final = new TCanvas (“Final”,“Correlation”);
TH2D h3 = (TH2D)RawDeltaPhi1->Clone(“h3”);
The second Signal canvas is blank.
Can you post the full script please? The snippet you posted looks fine.
There is a warning.
Warning in TCanvas::ResizePad: Inf/NaN propagated to the pad. Check drawn objects.
Well there you go then, you are trying to draw a histogram with malformed entries.
You probably have an error in your program’s logic that causes it to fill a histogram with “inf” or “NaN” values.
I have no way to know, sorry you have to debug your program, for example by taking a copy of your program, deleting everything that does not have anything to do with the problematic histogram, checking that the reduced program still reproduces the issue and then printing at screen all the values you are filling the histogram with.
So you can manually inspect what is going on and what is going wrong. This might be a good start.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.