legendstyle='p', title="SM", ) point_sm.SetPoint(1, 1, 1) point_sm_bkg = point_sm.Clone() point_sm_bkg.markercolor = 'white' point_sm_bkg.markersize = 2.3 # Custom palette palette = ColourPalette() palette.set_palette("mystic_ocean") # Create canvas canvas = Canvas(width=750, height=650) canvas.margin = 0.12, 0.15, 0.12, 0.08 # Custom legend # legend position # False True # ---------------------- # True | top left | top right # |--------------------- # False | bot left | bot right pos = { (True, True): "top right", (False, True): "top left", (True, False): "bot right", (False, False): "bot left", }[(best_fit[0][0] - sum(x_range) / 2 < 0., best_fit[0][1] - sum(y_range) / 2 < 0.)]
#for lb, cb, mb, fb in zip(lbias, cbias, mask, failing): # if fb.value > 0.2: # lb.value = -100. # cb.value = -100. # mb.value = 1. # else: # mb.value = -1. ROOT.gStyle.SetPaintTextFormat('.2f') axis = 'yaxis' if args.conly else 'zaxis' yrange = (-0.2, 0.2) if args.conly else (-1, 1) getattr(cbias, axis).range_user = yrange if not args.conly: lbias.zaxis.range_user = (-1, 1) canvas = Canvas(800, 800) canvas.margin = (0.15, 0.15, 0.15, 0.1) from array import array ROOT.TColor.CreateGradientColorTable(5, array('d', [0., 0.3, .5, 0.7, 1.]), array('d', [0., 0., .95, 1., 1.]), array('d', [0., 0., .95, 0., 0.]), array('d', [1., 1., .95, 0., 0.]), 255) ROOT.gStyle.SetNumberContours(255) #mask.fillstyle = 3354 #mask.fillcolor = 1 #mask.zaxis.range_user = (-0.9, 0.9) hdrawopts = 'HIST text' if args.conly else 'colz text' fitdrawopts = '' if args.conly else 'P SAME' if not args.conly: