ROOT Version: 6.26/04
Platform: x86_64-centos7
Compiler: gcc8
Dear Root Experts,
I am using pyRoot to draw a THStack object consisting of a number of histograms. I then also draw the legend with style “F”. I am puzzled by the fact that sometimes the boxes denoting the fill colour in the legend are surrounded by a bold, rounded line, and sometimes they are surrounded by a sharp non-bold line. I initially thought this might have been because some histograms which compose the THStack objects are TH1F histograms, and some are TH1D histograms, and that there are different style settings for each. I tried turning each histogram into a TH1D histogram (see code snippet), but I still get some histograms sporadically deciding to have smooth bold boundaries.
if hist.InheritsFrom("TH1F"):
h1d = root.TH1D(hist.GetName(), hist.GetTitle(), hist.GetNbinsX(), hist.GetXaxis().GetXbins().GetArray())
for iBin in range(1,h1d.GetNbinsX()+1):
h1d.SetBinContent(iBin, hist.GetBinContent(iBin))
h1d.SetBinError(iBin, hist.GetBinError(iBin))
hist = h1d;
These are the smooth, bold boundaries I’m talking about
I don’t want the “JfakeY” entry to be bold here. I also tried printing out a bunch of gStyle options using the python debugger and they all seem to be the same when I loop over each histogram in the THStack object.
Any help would be appreciated!
Ben