Skip to content

Commit

Permalink
Use RGB color pythonization in tutorials where possible
Browse files Browse the repository at this point in the history
  • Loading branch information
guitargeek committed Dec 2, 2024
1 parent def43b2 commit a6264b3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions tutorials/dataframe/df105_WBosonAnalysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,10 @@ def merge_histos(label):
stack = ROOT.THStack()
for h, color in zip(
[singletop, diboson, ttbar, zjets, wjets],
[(208, 240, 193), (195, 138, 145), (155, 152, 204), (248, 206, 104), (222, 90, 106)]):
[(0.82, 0.94, 0.76), (0.76, 0.54, 0.57), (0.61, 0.6, 0.8), (0.97, 0.81, 0.41), (0.87, 0.35, 0.42)]):
h.SetLineWidth(1)
h.SetLineColor("black")
h.SetFillColor(ROOT.TColor.GetColor(*color))
h.SetFillColor(color)
stack.Add(h)
stack.Draw("HIST")
stack.GetXaxis().SetLabelSize(0.04)
Expand Down
4 changes: 2 additions & 2 deletions tutorials/dataframe/df107_SingleTopAnalysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,10 @@ def merge_histos(label):
wjets.Scale(1.1) # Corrected normalization derived from a validation region
for h, color in zip(
[wjets, twtb, singletop],
[(222, 90, 106), (155, 152, 204), (208, 240, 193)]):
[(0.87, 0.35, 0.42), (0.61, 0.6, 0.8), (0.82, 0.94, 0.76)]):
h.SetLineWidth(1)
h.SetLineColor("black")
h.SetFillColor(ROOT.TColor.GetColor(*color))
h.SetFillColor(color)
stack.Add(h)
stack.Draw("HIST")
stack.GetXaxis().SetTitle("m_{W(l#nu)+b} [GeV]")
Expand Down
4 changes: 2 additions & 2 deletions tutorials/rcanvas/df105.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,10 @@ def merge_histos(label):
stack = ROOT.THStack()
for h, color in zip(
[singletop, diboson, ttbar, zjets, wjets],
[(208, 240, 193), (195, 138, 145), (155, 152, 204), (248, 206, 104), (222, 90, 106)]):
[(0.82, 0.94, 0.76), (0.76, 0.54, 0.57), (0.61, 0.6, 0.8), (0.97, 0.81, 0.41), (0.87, 0.35, 0.42)]):
h.SetLineWidth(1)
h.SetLineColor("black")
h.SetFillColor(ROOT.TColor.GetColor(*color))
h.SetFillColor(color)
stack.Add(h)
c.Add[TObjectDrawable]().Set(stack, "HIST SAME")

Expand Down

0 comments on commit a6264b3

Please sign in to comment.