Problem with filling of horizontal bar histograms

Hi,

I used to make a pull graph, which visualized positive and negative pulls as horizontal bars that can be positive or negative. Since horizontal bar histograms only fill from the left axis to the value, I defined a second mask histogram, masking out the parts of the bars that I don’t want. That was filled white.

In recent root versions, this doesn’t work anymore, because the bars get filled black, not white! Any other fill color works fine, only white fails.

This is in Root 5-34-18.

Any ideas?
Cheers
Moritz
pulls.C (1.81 KB)


I see the black bars too… I am looking.

When did you updated ROOT last time ? so I can track the change.
I suspect it was done on purpose.
The safest is to use your own white:

   Int_t ci = 12345;
   TColor *color = new TColor(ci, 1., 1., 1.);
   hPullsMaskUID98->SetFillColor(ci);

Hi,

The bug was introduced in 5.34.15, 5.34.14 was still fine. I used these to to find it:

source /afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.14/x86_64-slc6-gcc48-opt/root/bin/thisroot.sh
source /afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.15/x86_64-slc6-gcc48-opt/root/bin/thisroot.sh

The workaround doesn’t fully fix the problem unfortunately, because in my production script (attachted)
i) there is still a weird black area in the right TPad, which I don’t even know how to configure the color of, and
ii) when the thing is saved as .C, “my own white” gets lost again.

Also, this plot is only this complicated because there is no way (that I know of) to configure alphanumeric labels for a TGaxis.

Cheers
Moritz
pulls_dsk_sfit_sol0.C (8.36 KB)

I now remember why we introduced this. This is not a bug. It was done on purpose to make sure the histograms are always visible. We had some complains that, sometimes, an histogram can be invisible because drawn white in a white pad. Now the way you are using histograms is a bit “at the edge” of a normal use as it is not real data. It is use as a rubber to erase part of the bins. Nevertheless I will check your script.

I do not see this in the original macro “pulls.C”… Should I debug the new one you last sent ?
This macro has been produced with “Save As”… May it it would be better to debug the original one.

do:

   Int_t ci = 12345;
   TColor *color = new TColor(ci, 1., 1., .9);
   hPullsMaskUID98->SetFillColor(ci);

Ok, I’ve changed the plot now such that the problem doesn’t exist anymore. I don’t use histograms for it anymore.