示例#1
0
			yf = p.GetYaxis().GetXmin()
			x2 = p.GetXaxis().GetXmax()
			y2 = p.GetYaxis().GetXmax()

			Xa = (x2-x1)/(1-lm-rm)-(x2-x1)
			Ya = (y2-yf)/(1-bm-to)-(y2-yf)
			LM = Xa*(lm/(lm+rm))
			RM = Xa*(rm/(lm+rm))
			BM = Ya*(bm/(bm+to))
			TM = Ya*(to/(bm+to))
			null2 = TPad("null2","",0,0,1,1)
			null2.SetFillStyle(0)
			null2.SetFrameFillStyle(0)
			null2.Draw()
			null2.cd()
			null2.Range(x1-LM,yf-BM,x2+RM,y2+TM)
			null2.SetRightMargin(0.20)
			null2.SetLeftMargin(margine)
			null2.SetTopMargin(0.10)
			null2.SetBottomMargin(margine)
			#exclusion.SetMinimum(the_minimum)
			#exclusion.SetMaximum(the_maximum)
			exclusion.GetXaxis().SetRangeUser(-0.05,1.05)
			exclusion.GetYaxis().SetRangeUser(-0.05,1.05)
			exclusion.GetXaxis().SetLabelOffset(100)
			exclusion.GetYaxis().SetLabelOffset(100)
			#exclusion.Draw('CONT3')
			#exclusion2.Draw()
			c2=TCanvas(name+'_c2')
			c2.cd()
			exclusion.Draw('CONT Z LIST')
示例#2
0
    staveInnerRXZ[i].Draw("same")
    staveOuterLXZ[i].Draw("same")
    staveOuterRXZ[i].Draw("same")
dipoleExit.SetLineColor(ROOT.kViolet)
dipoleExit.SetLineStyle(2)
pad1.Update()
cnv.cd(1)
# compute the pad range with suitable margins
ymin = hxE.GetYaxis().GetXmin()
ymax = hxE.GetYaxis().GetXmax()
dy = (ymax - ymin) / 0.8  #10 margins top and bottom
xmin = hxE.GetXaxis().GetXmin()
xmax = hxE.GetXaxis().GetXmax()
dx = (xmax - xmin) / 0.8
#10 per cent margins left and right
pad2.Range(xmin - 0.1 * dx, ymin - 0.1 * dy, xmax + 0.1 * dx, ymax + 0.1 * dy)
pad2.Draw()
pad2.cd()
hxE.SetMarkerColor(ROOT.kViolet)
hxE.Draw("][scat same")
pad2.Update()
# draw axis on the right side of the pad
axis = TGaxis(xmax, ymin, xmax, ymax, ymin, ymax, 50510, "+L")
axis.SetLineColor(ROOT.kViolet)
axis.SetLabelColor(ROOT.kViolet)
axis.SetTitle("E [GeV]")
axis.SetTitleColor(ROOT.kViolet)
axis.SetLabelSize(0.035)
axis.SetTitleSize(0.035)
axis.Draw()
#### yz