I am taking the xy plane of a TH3D histogram by iterating through each bin on the plane and putting the contents into a TH2D respectively.
for y in range(0,f.binN.y):
for x in range(0,f.binN.x):
binXY=f.histObj.GetBinContent(f.histObj.GetBin(x+1, y+1, f.binN.z/2))
Then when I say:
test.png looks like the attached picture.
It seems like it disregards the formatting code. This formatting worked for TH2D which was a result of Project3D of TH3D which is essentially the same right?
We’ll have a look at it with the graphics expert and get back to you on Monday.
I am not sure what you mean by “It seems like it disregards the formatting code”…
Because with that code I would expect it to look somewhat like the top row on this:
Can you provide a running sample reproducing the problem ?
Attached the small code and root file and the output picture.
2dxyplane.root (157 KB)
example.py (294 Bytes)
TFile *f = new TFile("2dxyplane.root");
TH2D *h2 = (TH2D*)xyPlane->DrawClone("cont3 same");