Skip to content

Commit

Permalink
Minor modifications to match the CMS plot style recommendations
Browse files Browse the repository at this point in the history
  • Loading branch information
Alberto Zucchetta (UniZ) [zucchett] committed Feb 21, 2019
1 parent 706a8a3 commit 8888444
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Validation/Geometry/test/MaterialBudget.py
Expand Up @@ -837,7 +837,7 @@ def setRanges(h):
hist_X0_elements[label].SetFillColor(color)
hist_X0_elements[label].SetLineColor(kBlack)
stack_X0.Add(hist_X0_elements[label])
theLegend.AddEntry(hist_X0_elements[label], leg, "f")
if hist_X0_elements[label].Integral() > 0.: theLegend.AddEntry(hist_X0_elements[label], leg, "f")

# canvas
canname = "MBCan_1D_%s_%s" % (detector, plot)
Expand All @@ -851,8 +851,9 @@ def setRanges(h):

# Draw
setRanges(stack_X0.GetStack().Last())
#stack_X0.SetTitle(';'+(stack_X0.GetTitle().split(';', 1)[1] if ';' in stack_X0.GetTitle() else ""))
stack_X0.Draw("HIST");
stack_X0.GetXaxis().SetLabelSize(0.035)
stack_X0.GetYaxis().SetLabelSize(0.035)
theLegend.Draw();

cmsMark = TLatex()
Expand Down

0 comments on commit 8888444

Please sign in to comment.