axes[0].Draw("axis") axes[0].SetMinimum(1.0) stack.Draw("samenoclear") stack2.Draw("samenoclear") h_err.Draw('e2same') h_dat.Draw("esamex0") pads[1].cd() axes[1].Draw("axis") axes[1].GetYaxis().SetDecimals(True) axes[1].GetXaxis().SetDecimals(True) line = ROOT.TLine() plot.DrawHorizontalLine(pads[1], line, 1) h_sig_r.Draw('samehist') h_sig_mu1_r.Draw('samehist') blank_r.Draw('samehist') blank_r.Print('range') h_err_r.Draw('e2same') h_dat_r.Draw('esamex0') pads[0].cd() axes[0].SetMaximum(8E6) # plot.FixTopRange(pads[0], plot.GetPadYMax(pads[0]), 0.3) legend = plot.PositionedLegend(0.30, 0.20, 3, 0.03)
for other in new_others: other['graph'].Draw('SAME') for other in other_scans: if args.breakdown is not None: other['graph'].SetMarkerSize(0.4) if args.pub: other['graph'].SetMarkerSize(0.0) other['graph'].Draw('SAME') line = ROOT.TLine() for i, yval in enumerate(yvals): line.SetLineColor(ROOT.kRed) if args.pub and i > 0: line.SetLineColor(ROOT.kGreen + 2) plot.DrawHorizontalLine(pads[0], line, yval) if (len(other_scans) == 0 or args.upper_cl is not None) and args.pub is False: for cr in main_scan['crossings'][yval]: if cr['valid_lo']: line.DrawLine(cr['lo'], 0, cr['lo'], yval) if cr['valid_hi']: line.DrawLine(cr['hi'], 0, cr['hi'], yval) # main_scan['func'].SetNpx(200) if args.pub: main_scan['func'].SetLineStyle(args.line_style) main_scan['func'].Draw('same') for other in other_scans: if args.breakdown is not None: other['func'].SetLineStyle(2)
pprint.pprint(info) for i, scan in enumerate(scans): plotting.Set(scan.gr, **scan.graph_settings) plotting.Set(scan.fn, **scan.func_settings) if i == 0: scan.gr.Draw('AP') axishist = plotting.GetAxisHist(pads[0]) axishist.SetMaximum(args.y_max) axishist.GetYaxis().SetTitle("#minus2 ln #Lambda") axishist.GetXaxis().SetTitle("x") for crossing in crossings_vals: line = ROOT.TLine() line.SetLineColor(ROOT.kRed) plotting.DrawHorizontalLine(pads[0], line, crossing) scan.gr.Draw('PSAME') scan.fn.Draw('SAME') ## Draw a white box in the top of the pad box = ROOT.TBox(axishist.GetXaxis().GetXmin(), args.box_frac * args.y_max, axishist.GetXaxis().GetXmax(), args.y_max) box.Draw() pads[0].GetFrame().Draw() pads[0].RedrawAxis() ## Draw the box containing the best fit values draw_values_box = True if draw_values_box: # box_args = [float(x) for x in args.values_box]