# as before but also apply style options to TGraph elif len(splitsrc) >= 2: settings = {} settings['Title'] = src if args.auto_style is not None: nm = 'default' for x in icol.keys(): if x in splitsrc[1]: nm = x i = icol[nm] # take the next default color... j = iline[nm] # take the next default line style... settings['LineColor'] = defcols[i] settings['MarkerColor'] = defcols[i] settings['LineStyle'] = j icol[nm] = (i + 1) if (i + 1) < len(defcols) else 0 graphs.append(plot.LimitTGraphFromJSONFile(file, splitsrc[1])) if len(splitsrc) >= 3: settings.update({ x.split('=')[0]: eval(x.split('=')[1]) for x in splitsrc[2].split(',') }) plot.Set(graphs[-1], **settings) if axis is None: axis = plot.CreateAxisHists(len(pads), graphs[-1], True) DrawAxisHists(pads, axis, pads[0]) graphs[-1].Draw('PLSAME') legend.AddEntry(graphs[-1], '', 'PL') axis[0].GetYaxis().SetTitle('95%% CL limit on %s' % args.limit_on) if args.y_title is not None: axis[0].GetYaxis().SetTitle(args.y_title)
elif len(splitsrc) >= 2: settings = {} settings['Title'] = src if args.auto_style is not None: nm = 'default' for x in icol.keys(): if x in splitsrc[1]: nm = x i = icol[nm] # take the next default color... j = iline[nm] # take the next default line style... settings['LineColor'] = defcols[i] settings['MarkerColor'] = defcols[i] settings['LineStyle'] = j icol[nm] = (i+1) if (i+1) < len(defcols) else 0 graph = plot.LimitTGraphFromJSONFile(file, splitsrc[1]) graphs.append(graph) if len(splitsrc) >= 3: settings.update({x.split('=')[0]: eval(x.split('=')[1]) for x in splitsrc[2].split(',')}) plot.Set(graphs[-1], **settings) if axis is None: axis = plot.CreateAxisHists(len(pads), graphs[-1], True) DrawAxisHists(pads, axis, pads[0]) graphs[-1].Draw('PLSAME') legend.AddEntry(graphs[-1], '', 'PL') axis[0].GetYaxis().SetTitle('95% CL limit on #sigma#font[42]{(gg#phi)}#upoint#font[42]{BR}#font[42]{(#phi#rightarrow#tau#tau)} [pb]') if args.process == "bb#phi": axis[0].GetYaxis().SetTitle('95% CL limit on #sigma#font[42]{(bb#phi)}#upoint#font[42]{BR}#font[42]{(#phi#rightarrow#tau#tau)} [pb]')