Skip to content

Commit

Permalink
Small fix to expected only limit plotting
Browse files Browse the repository at this point in the history
  • Loading branch information
Rebecca Lane committed Jul 18, 2016
1 parent f84a834 commit c1c8eb5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions CombineTools/python/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -1469,12 +1469,14 @@ def DrawLimitBand(pad, graph_dict, draw=['exp2', 'exp1', 'exp0', 'obs'], draw_le
legend_dict[key] = legend_overwrite[key]
pad.cd()
for key in draw:
graph_dict[key].Draw(legend_dict[key]['DrawStyle'])
if key in graph_dict:
graph_dict[key].Draw(legend_dict[key]['DrawStyle'])
if legend is not None:
if draw_legend is None:
draw_legend = reversed(draw)
for key in draw_legend:
legend.AddEntry(graph_dict[key],legend_dict[key]['Label'],legend_dict[key]['LegendStyle'])
if key in graph_dict:
legend.AddEntry(graph_dict[key],legend_dict[key]['Label'],legend_dict[key]['LegendStyle'])



Expand Down
2 changes: 1 addition & 1 deletion HIG16006/scripts/plotMSSMLimits.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def DrawAxisHists(pads, axis_hists, def_pad=None):
plot.DrawLimitBand(pads[0], graph_sets[-1], legend=legend,legend_overwrite=style_dict["legend"])
else:
plot.StyleLimitBand(graph_sets[-1])
plot.DrawLimitBand(pads[0], graph_sets[-1])
plot.DrawLimitBand(pads[0], graph_sets[-1],legend=legend)
pads[0].RedrawAxis()
pads[0].RedrawAxis('g')
pads[0].GetFrame().Draw()
Expand Down

0 comments on commit c1c8eb5

Please sign in to comment.