当前位置: 首页>>代码示例>>Python>>正文


Python color函数代码示例

本文整理汇总了Python中color函数的典型用法代码示例。如果您正苦于以下问题:Python color函数的具体用法?Python color怎么用?Python color使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了color函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: Execute

 def Execute(self, device, rect):
     if device.has_radial_gradient:
         self.execute_radial(device, rect)
         return
     steps = device.gradient_steps
     cx, cy = self.center
     cx = cx * rect.right + (1 - cx) * rect.left
     cy = cy * rect.top + (1 - cy) * rect.bottom
     radius = max(
         hypot(rect.left - cx, rect.top - cy),
         hypot(rect.right - cx, rect.top - cy),
         hypot(rect.right - cx, rect.bottom - cy),
         hypot(rect.left - cx, rect.bottom - cy),
     )
     color = self.gradient.ColorAt
     SetFillColor = device.SetFillColor
     FillCircle = device.FillCircle
     SetFillColor(color(0))
     apply(device.FillRectangle, tuple(rect))
     radius = radius * (1.0 - self.border)
     dr = radius / steps
     device.PushTrafo()
     device.Translate(cx, cy)
     center = NullPoint
     for i in range(steps):
         SetFillColor(color(float(i) / (steps - 1)))
         FillCircle(center, radius)
         radius = radius - dr
     device.PopTrafo()
开发者ID:moljac,项目名称:HolisticWare.Productivity.Xamarin.Mobile.Artwork,代码行数:29,代码来源:pattern.py

示例2: DrawObsArea

    def DrawObsArea(self):
        # add points to observed to close area
        # this will disappear
        self.OBS['nominal'].SetPoint(self.OBS['nominal'].GetN(), 1300,-1300)
        self.OBS['nominal'].SetPoint(self.OBS['nominal'].GetN(), -1300,-1300)
        # observed

        trasparentColor = rt.gROOT.GetColor(color(self.OBS['colorArea']))
        trasparentColor.SetAlpha(0.5)
        self.OBS['nominal'].SetFillColor(color(self.OBS['colorArea']))
        self.OBS['nominal'].SetLineStyle(1)
        # DRAW AREAS
        self.OBS['nominal'].Draw("FSAME")
开发者ID:ETHZ,项目名称:MPAF,代码行数:13,代码来源:smsPlotCONT.py

示例3: DrawLines

    def DrawLines(self):
        # observed
        self.OBS['nominal'].SetLineColor(color(self.OBS['colorLine']))
        self.OBS['nominal'].SetLineStyle(1)
        self.OBS['nominal'].SetLineWidth(4)
        # observed + 1sigma
        self.OBS['plus'].SetLineColor(color(self.OBS['colorLine']))
        self.OBS['plus'].SetLineStyle(7)
        self.OBS['plus'].SetLineWidth(4)        
        # observed - 1sigma
        self.OBS['minus'].SetLineColor(color(self.OBS['colorLine']))
        self.OBS['minus'].SetLineStyle(7)
        self.OBS['minus'].SetLineWidth(4)        
        # expected + 2sigma
        self.EXP2['plus2'].SetLineColor(color(self.EXP2['colorLine']))
        self.EXP2['plus2'].SetLineStyle(7)
        self.EXP2['plus2'].SetLineWidth(2)                
        # expected + 1sigma
        self.EXP['plus'].SetLineColor(color(self.EXP['colorLine']))
        self.EXP['plus'].SetLineStyle(7)
        self.EXP['plus'].SetLineWidth(4)                
        # expected
        self.EXP['nominal'].SetLineColor(color(self.EXP['colorLine']))
        self.EXP['nominal'].SetLineStyle(1)
        self.EXP['nominal'].SetLineWidth(4)        
        # expected - 2sigma
        self.EXP2['minus2'].SetLineColor(color(self.EXP2['colorLine']))
        self.EXP2['minus2'].SetLineStyle(7)
        self.EXP2['minus2'].SetLineWidth(2)          
        # expected - 1sigma
        self.EXP['minus'].SetLineColor(color(self.EXP['colorLine']))
        self.EXP['minus'].SetLineStyle(7)
        self.EXP['minus'].SetLineWidth(4)                      
        # DRAW LINES
        #self.EXP['nominal'].Draw("LSAME")
        #self.EXP2['plus2'].Draw("LSAME")
        #self.EXP2['minus2'].Draw("LSAME")

        #self.OBS['plus'].Draw("LSAME")
        #self.OBS['minus'].Draw("LSAME")    
        #self.EXP['plus'].Draw("LSAME")
        #self.EXP['minus'].Draw("LSAME")
        #self.OBS['nominal'].Draw("LSAME")
        #self.OBS['plus'].Draw("LSAME")
        #self.OBS['minus'].Draw("LSAME")
        #self.EXP['plus'].Draw("LSAME")
        #self.EXP['nominal'].Draw("LSAME")
        #self.OBS['plus'].Draw("LSAME")
        #self.EXP['plus'].Draw("LSAME")
        #self.OBS['plus'].Draw("LSAME")
        #self.OBS['nominal'].Draw("LSAME") 

        self.EXP['minus'].Draw("LSAME")
        self.EXP['nominal'].SetMarkerStyle(20);
        self.EXP['nominal'].Draw("lSAME")
        self.EXP['plus'].Draw("LSAME")
    
        self.OBS['minus'].Draw("LSAME")
        self.OBS['nominal'].Draw("LSAME")
        self.OBS['plus'].Draw("LSAME")
开发者ID:RazorCMS,项目名称:RazorEWKSUSYAnalysis,代码行数:60,代码来源:smsPlotABS.py

示例4: DrawLines

    def DrawLines(self):
        # observed
        self.OBS["nominal"].SetLineColor(1)
        self.OBS["nominal"].SetLineStyle(1)
        self.OBS["nominal"].SetLineWidth(4)
        # observed + 1sigma
        self.OBS["plus"].SetLineColor(1)
        self.OBS["plus"].SetLineWidth(2)
        self.OBS["plus"].SetLineStyle(1)
        # observed - 1sigma
        self.OBS["minus"].SetLineColor(1)
        self.OBS["minus"].SetLineWidth(2)
        self.OBS["minus"].SetLineStyle(1)
        # expected
        self.EXP["nominal"].SetLineColor(1)
        self.EXP["nominal"].SetLineWidth(4)
        self.EXP["nominal"].SetLineStyle(2)
        # build one graph summing the + and - 1 sigma
        nP = self.EXP["plus"].GetN()
        nM = self.EXP["minus"].GetN()
        sigmaBandX = []
        sigmaBandY = []
        for i in range(0, nP):
            sigmaBandX.append(rt.Double(0.0))
            sigmaBandY.append(rt.Double(0.0))
            self.EXP["plus"].GetPoint(i, sigmaBandX[i], sigmaBandY[i])
        for i in range(0, nM):
            sigmaBandX.append(rt.Double(0.0))
            sigmaBandY.append(rt.Double(0.0))
            # self.EXP['minus'].GetPoint(i, sigmaBandX[i+nP], sigmaBandY[i+nP])
        for i in range(0, nM):
            self.EXP["minus"].GetPoint(i, sigmaBandX[nP + nM - i - 1], sigmaBandY[nP + nM - i - 1])
        sigmaBand = rt.TGraph(nP + nM, array("d", sigmaBandX), array("d", sigmaBandY))
        # sigmaBand.SetFillStyle(3001)
        sigmaBand.SetFillColor(color(self.EXP["colorArea"]))
        sigmaBand.Draw("FSAME")
        self.c.sigmaBand = sigmaBand

        # expected + 1sigma
        self.EXP["plus"].SetLineColor(1)
        self.EXP["plus"].SetLineStyle(3)
        # expected - 1sigma
        self.EXP["minus"].SetLineColor(1)
        self.EXP["minus"].SetLineStyle(3)
        # DRAW LINES
        self.OBS["nominal"].Draw("LSAME")
        self.OBS["plus"].Draw("LSAME")
        self.OBS["minus"].Draw("LSAME")
        self.EXP["nominal"].Draw("LSAME")
开发者ID:MT2Analysis,项目名称:PlotsSMS,代码行数:49,代码来源:smsPlotBrazil.py

示例5: DrawLegend

    def DrawLegend(self):
        xRange = self.model.Xmax-self.model.Xmin
        yRange = self.model.Ymax-self.model.Ymin
        
        LObs = rt.TGraph(2)
        LObs.SetName("LObs")
        LObs.SetTitle("LObs")
        LObs.SetLineColor(color(self.OBS['colorLine']))
        LObs.SetLineStyle(1)
        LObs.SetLineWidth(4)
        LObs.SetMarkerStyle(20)
        LObs.SetPoint(0,self.model.Xmin+3*xRange/100, self.model.Ymax-1.35*yRange/100*10)
        LObs.SetPoint(1,self.model.Xmin+10*xRange/100, self.model.Ymax-1.35*yRange/100*10)

        LObsP = rt.TGraph(2)
        LObsP.SetName("LObsP")
        LObsP.SetTitle("LObsP")
        LObsP.SetLineColor(color(self.OBS['colorLine']))
        LObsP.SetLineStyle(1)
        LObsP.SetLineWidth(2)
        LObsP.SetMarkerStyle(20)
        LObsP.SetPoint(0,self.model.Xmin+3*xRange/100, self.model.Ymax-1.20*yRange/100*10)
        LObsP.SetPoint(1,self.model.Xmin+10*xRange/100, self.model.Ymax-1.20*yRange/100*10)

        LObsM = rt.TGraph(2)
        LObsM.SetName("LObsM")
        LObsM.SetTitle("LObsM")
        LObsM.SetLineColor(color(self.OBS['colorLine']))
        LObsM.SetLineStyle(1)
        LObsM.SetLineWidth(2)
        LObsM.SetMarkerStyle(20)
        LObsM.SetPoint(0,self.model.Xmin+3*xRange/100, self.model.Ymax-1.50*yRange/100*10)
        LObsM.SetPoint(1,self.model.Xmin+10*xRange/100, self.model.Ymax-1.50*yRange/100*10)

        textObs = rt.TLatex(self.model.Xmin+11*xRange/100, self.model.Ymax-1.50*yRange/100*10, "Observed #pm 1 #sigma_{theory}")
        textObs.SetTextFont(42)
        textObs.SetTextSize(0.040)
        textObs.Draw()
        self.c.textObs = textObs

        LExpP = rt.TGraph(2)
        LExpP.SetName("LExpP")
        LExpP.SetTitle("LExpP")
        LExpP.SetLineColor(color(self.EXP['colorLine']))
        LExpP.SetLineStyle(7)
        LExpP.SetLineWidth(2)  
        LExpP.SetPoint(0,self.model.Xmin+3*xRange/100, self.model.Ymax-1.85*yRange/100*10)
        LExpP.SetPoint(1,self.model.Xmin+10*xRange/100, self.model.Ymax-1.85*yRange/100*10)
        
        LExp = rt.TGraph(2)
        LExp.SetName("LExp")
        LExp.SetTitle("LExp")
        LExp.SetLineColor(color(self.EXP['colorLine']))
        LExp.SetLineStyle(7)
        LExp.SetLineWidth(4)
        LExp.SetPoint(0,self.model.Xmin+3*xRange/100, self.model.Ymax-2.00*yRange/100*10)
        LExp.SetPoint(1,self.model.Xmin+10*xRange/100, self.model.Ymax-2.00*yRange/100*10)
        
        LExpM = rt.TGraph(2)
        LExpM.SetName("LExpM")
        LExpM.SetTitle("LExpM")
        LExpM.SetLineColor(color(self.EXP['colorLine']))
        LExpM.SetLineStyle(7)
        LExpM.SetLineWidth(2)  
        LExpM.SetPoint(0,self.model.Xmin+3*xRange/100, self.model.Ymax-2.15*yRange/100*10)
        LExpM.SetPoint(1,self.model.Xmin+10*xRange/100, self.model.Ymax-2.15*yRange/100*10)

        LExpP2 = rt.TGraph(2)
        LExpP2.SetName("LExpP2")
        LExpP2.SetTitle("LExpP2")
        LExpP2.SetLineColor(color(self.EXP2['colorLine']))
        LExpP2.SetLineStyle(7)
        LExpP2.SetLineWidth(2)  
        LExpP2.SetPoint(0,self.model.Xmin+3*xRange/100, self.model.Ymax-1.75*yRange/100*10)
        LExpP2.SetPoint(1,self.model.Xmin+10*xRange/100, self.model.Ymax-1.75*yRange/100*10)

        LExpM2 = rt.TGraph(2)
        LExpM2.SetName("LExpM")
        LExpM2.SetTitle("LExpM")
        LExpM2.SetLineColor(color(self.EXP2['colorLine']))
        LExpM2.SetLineStyle(7)
        LExpM2.SetLineWidth(2)  
        LExpM2.SetPoint(0,self.model.Xmin+3*xRange/100, self.model.Ymax-2.25*yRange/100*10)
        LExpM2.SetPoint(1,self.model.Xmin+10*xRange/100, self.model.Ymax-2.25*yRange/100*10)
        
        #textExp = rt.TLatex(self.model.Xmin+11*xRange/100, self.model.Ymax-2.15*yRange/100*10, "Expected #pm 1, #pm 2 #sigma_{experiment}")
        textExp = rt.TLatex(self.model.Xmin+11*xRange/100, self.model.Ymax-2.15*yRange/100*10, "Expected #pm 1 #sigma_{experiment}")
        textExp.SetTextFont(42)
        textExp.SetTextSize(0.040)
        textExp.Draw()
        self.c.textExp = textExp

        LObs.Draw("LSAME")
        LObsM.Draw("LSAME")
        LObsP.Draw("LSAME")
        LExp.Draw("LSAME")
        #LExpM2.Draw("LSAME")
        #LExpP2.Draw("LSAME")
        LExpM.Draw("LSAME")
        LExpP.Draw("LSAME")
#.........这里部分代码省略.........
开发者ID:kelleyrw,项目名称:AnalysisTools,代码行数:101,代码来源:smsPlotABS.py

示例6: DrawLines

 def DrawLines(self):
     # observed
     self.OBS["nominal"].SetLineColor(color(self.OBS["colorLine"]))
     self.OBS["nominal"].SetLineStyle(1)
     self.OBS["nominal"].SetLineWidth(4)
     # observed + 1sigma
     self.OBS["plus"].SetLineColor(color(self.OBS["colorLine"]))
     self.OBS["plus"].SetLineStyle(1)
     self.OBS["plus"].SetLineWidth(2)
     # observed - 1sigma
     self.OBS["minus"].SetLineColor(color(self.OBS["colorLine"]))
     self.OBS["minus"].SetLineStyle(1)
     self.OBS["minus"].SetLineWidth(2)
     # expected + 1sigma
     self.EXP["plus"].SetLineColor(color(self.EXP["colorLine"]))
     self.EXP["plus"].SetLineStyle(7)
     self.EXP["plus"].SetLineWidth(2)
     # expected
     self.EXP["nominal"].SetLineColor(color(self.EXP["colorLine"]))
     self.EXP["nominal"].SetLineStyle(7)
     self.EXP["nominal"].SetLineWidth(4)
     # expected - 1sigma
     self.EXP["minus"].SetLineColor(color(self.EXP["colorLine"]))
     self.EXP["minus"].SetLineStyle(7)
     self.EXP["minus"].SetLineWidth(2)
     # DRAW LINES
     self.EXP["nominal"].Draw("LSAME")
     self.EXP["plus"].Draw("LSAME")
     self.EXP["minus"].Draw("LSAME")
     self.OBS["nominal"].Draw("LSAME")
     self.OBS["plus"].Draw("LSAME")
     self.OBS["minus"].Draw("LSAME")
开发者ID:manuelfs,项目名称:PlotsSMS,代码行数:32,代码来源:smsPlotABS.py

示例7: DrawLines

 def DrawLines(self):
     # observed
     self.OBS['nominal'].SetLineColor(color(self.OBS['colorLine']))
     self.OBS['nominal'].SetLineStyle(1)
     self.OBS['nominal'].SetLineWidth(4)
     # observed + 1sigma
     self.OBS['plus'].SetLineColor(color(self.OBS['colorLine']))
     self.OBS['plus'].SetLineStyle(1)
     self.OBS['plus'].SetLineWidth(2)        
     # observed - 1sigma
     self.OBS['minus'].SetLineColor(color(self.OBS['colorLine']))
     self.OBS['minus'].SetLineStyle(1)
     self.OBS['minus'].SetLineWidth(2)        
     # expected + 1sigma
     self.EXP['plus'].SetLineColor(color(self.EXP['colorLine']))
     self.EXP['plus'].SetLineStyle(2)
     self.EXP['plus'].SetLineWidth(2)                
     # expected
     self.EXP['nominal'].SetLineColor(color(self.EXP['colorLine']))
     self.EXP['nominal'].SetLineStyle(2)
     self.EXP['nominal'].SetLineWidth(4)        
     # expected - 1sigma
     self.EXP['minus'].SetLineColor(color(self.EXP['colorLine']))
     self.EXP['minus'].SetLineStyle(2)
     self.EXP['minus'].SetLineWidth(2)                        
     # DRAW LINES
     self.EXP['nominal'].Draw("LSAME")
     self.EXP['plus'].Draw("LSAME")
     self.EXP['minus'].Draw("LSAME")
     self.OBS['nominal'].Draw("LSAME")
     self.OBS['plus'].Draw("LSAME")
     self.OBS['minus'].Draw("LSAME")        
开发者ID:ETHZ,项目名称:MPAF,代码行数:32,代码来源:smsPlotABS.py

示例8: parseText

def parseText(text):
    text = text.lower(); #lower case it to avoid issues with capitalisation
    sentence = nltk.word_tokenize(text);  #split the input into a list of words for processing.
    red = 0.0;
    blue = 0.0;
    green = 0.0;
    colorfound = 0;
        #find if any of our words match a color
    for word in sentence:
        for bcolor in baseColors: 
            if word == bcolor[0]:
                colorfound += 1;
                if (colorfound > 1): #if multiple colors match, we sorta average between them.
                    red = (red+bcolor[1])/colorfound;
                    green = (green+bcolor[2])/colorfound;
                    blue = (blue+bcolor[3])/colorfound;
                else:
                    red = bcolor[1];
                    green = bcolor[2];
                    blue = bcolor[3];
                
        #if any words match a brightness word    
    for word in sentence:
        for adj in brightnessAdjectives:
            if word == adj[0]:
                red = max(min(red+adj[1], 1.0), 0.0) #clamp between 0.0 and 1.0
                green = max(min(green+adj[1], 1.0), 0.0)
                blue = max(min(blue+adj[1], 1.0), 0.0)
                
        #if any words match a saturation word...
    for word in sentence:
        for adj in saturationAdjectives:
            if word == adj[0]: 
                red = max(min(red*adj[1], 1.0), 0.0) #clamp between 0.0 and 1.0
                green = max(min(green*adj[1], 1.0), 0.0)
                blue = max(min(blue*adj[1], 1.0), 0.0)
                

    if (colorfound == 0):
        raise NameError('ColorNotFound');
                
    return color(red, green, blue);
开发者ID:3MT,项目名称:ColorParser,代码行数:42,代码来源:colorparser.py

示例9: printDictList

def printDictList(d, color = lambda x : x, lvl = 0):
	"Auxiliar for printing complex structures like list and dictionaries"
	ret = []
	lvl_string = '  '
	if type(d) is dict:
		ret.append('%s{' % (lvl*lvl_string))
		for i in d.iteritems():
			ret.append('%s%s : %s' % ((lvl+1)*lvl_string, green(i[0]), printDictList(i[1], color, lvl + 1)))
		ret.append('%s}' % (lvl*lvl_string))
		return '\n'.join(ret)
	elif type(d) is list:
		ret.append('%s[' % (lvl*lvl_string))
		for l in [printDictList(i, color, lvl + 1) for i in d]:
			ret.append('%s%s' % ((lvl+1)*lvl_string, l))
		ret.append('%s]' % (lvl*lvl_string))
		return '\n'.join(ret)
	elif type(d) is tuple:
		ret.append('%s(' % (lvl*lvl_string))
		for l in [printDictList(i, color, lvl + 1) for i in d]:
			ret.append('%s%s' % ((lvl+1)*lvl_string, l))
		ret.append('%s)' % (lvl*lvl_string))
		return '\n'.join(ret)
	else:
		return color(str(d))
开发者ID:otaviobp,项目名称:mc910-proj,代码行数:24,代码来源:stringparser.py

示例10: DrawLegend

    def DrawLegend(self):
        self.obs = 1.5      #default 1.5, bigger 2.05
        self.exp = self.obs+0.65
        
        xRange = self.model.Xmax-self.model.Xmin
        yRange = self.model.Ymax-self.model.Ymin
        
        LObs = rt.TGraph(2)
        LObs.SetName("LObs")
        LObs.SetTitle("LObs")
        LObs.SetLineColor(color(self.OBS['colorLine']))
        LObs.SetLineStyle(1)
        LObs.SetLineWidth(4)
        LObs.SetMarkerStyle(20)
        LObs.SetPoint(0,self.model.Xmin+3*xRange/100, self.model.Ymax-(self.obs-0.15)*yRange/100*10)
        LObs.SetPoint(1,self.model.Xmin+10*xRange/100, self.model.Ymax-(self.obs-0.15)*yRange/100*10)

        LObsP = rt.TGraph(2)
        LObsP.SetName("LObsP")
        LObsP.SetTitle("LObsP")
        LObsP.SetLineColor(color(self.OBS['colorLine']))
        LObsP.SetLineStyle(1)
        LObsP.SetLineWidth(2)
        LObsP.SetMarkerStyle(20)
        LObsP.SetPoint(0,self.model.Xmin+3*xRange/100, self.model.Ymax-(self.obs-0.3)*yRange/100*10)
        LObsP.SetPoint(1,self.model.Xmin+10*xRange/100, self.model.Ymax-(self.obs-0.3)*yRange/100*10)

        LObsM = rt.TGraph(2)
        LObsM.SetName("LObsM")
        LObsM.SetTitle("LObsM")
        LObsM.SetLineColor(color(self.OBS['colorLine']))
        LObsM.SetLineStyle(1)
        LObsM.SetLineWidth(2)
        LObsM.SetMarkerStyle(20)
        LObsM.SetPoint(0,self.model.Xmin+3*xRange/100, self.model.Ymax-(self.obs)*yRange/100*10)
        LObsM.SetPoint(1,self.model.Xmin+10*xRange/100, self.model.Ymax-(self.obs)*yRange/100*10)

        textObs = rt.TLatex(self.model.Xmin+11*xRange/100, self.model.Ymax-self.obs*yRange/100*10, "Observed #pm 1 #sigma_{theory}")
        textObs.SetTextFont(42)
        textObs.SetTextSize(0.040)
        textObs.Draw()
        self.c.textObs = textObs

        LExpP = rt.TGraph(2)
        LExpP.SetName("LExpP")
        LExpP.SetTitle("LExpP")
        LExpP.SetLineColor(color(self.EXP['colorLine']))
        LExpP.SetLineStyle(7)
        LExpP.SetLineWidth(2)  
        LExpP.SetPoint(0,self.model.Xmin+3*xRange/100, self.model.Ymax-(self.exp-0.3)*yRange/100*10)
        LExpP.SetPoint(1,self.model.Xmin+10*xRange/100, self.model.Ymax-(self.exp-0.3)*yRange/100*10)

        LExp = rt.TGraph(2)
        LExp.SetName("LExp")
        LExp.SetTitle("LExp")
        LExp.SetLineColor(color(self.EXP['colorLine']))
        LExp.SetLineStyle(7)
        LExp.SetLineWidth(4)
        LExp.SetPoint(0,self.model.Xmin+3*xRange/100, self.model.Ymax-(self.exp-0.15)*yRange/100*10)
        LExp.SetPoint(1,self.model.Xmin+10*xRange/100, self.model.Ymax-(self.exp-0.15)*yRange/100*10)
        
        LExpM = rt.TGraph(2)
        LExpM.SetName("LExpM")
        LExpM.SetTitle("LExpM")
        LExpM.SetLineColor(color(self.EXP['colorLine']))
        LExpM.SetLineStyle(7)
        LExpM.SetLineWidth(2)  
        LExpM.SetPoint(0,self.model.Xmin+3*xRange/100, self.model.Ymax-(self.exp)*yRange/100*10)
        LExpM.SetPoint(1,self.model.Xmin+10*xRange/100, self.model.Ymax-(self.exp)*yRange/100*10)

        textExp = rt.TLatex(self.model.Xmin+11*xRange/100, self.model.Ymax-self.exp*yRange/100*10, "Expected #pm 1 #sigma_{experiment}")
        textExp.SetTextFont(42)
        textExp.SetTextSize(0.040)
        textExp.Draw()
        self.c.textExp = textExp

        LObs.Draw("LSAME")
        LObsM.Draw("LSAME")
        LObsP.Draw("LSAME")
        LExp.Draw("LSAME")
        LExpM.Draw("LSAME")
        LExpP.Draw("LSAME")
        
        self.c.LObs = LObs
        self.c.LObsM = LObsM
        self.c.LObsP = LObsP
        self.c.LExp = LExp
        self.c.LExpM = LExpM
        self.c.LExpP = LExpP
开发者ID:ETHZ,项目名称:MPAF,代码行数:89,代码来源:smsPlotABS.py

示例11: DrawLines

 def DrawLines(self):
     # observed
     if self.OBS:
        doOBS = True
        if 'nominal_base' in self.OBS:
           doOBS = False
           self.OBS['nominal_base'].SetLineColor(color(self.OBS['colorLine']))
           self.OBS['nominal_base'].SetLineStyle(1)
           self.OBS['nominal_base'].SetLineWidth(4)
        if 'nominal_extra' in self.OBS:
           doOBS = False
           self.OBS['nominal_extra'].SetLineColor(color(self.OBS['colorLine']))
           self.OBS['nominal_extra'].SetLineStyle(1)
           self.OBS['nominal_extra'].SetLineWidth(4)
        if doOBS and 'nominal' in self.OBS:
           self.OBS['nominal'].SetLineColor(color(self.OBS['colorLine']))
           self.OBS['nominal'].SetLineStyle(1)
           self.OBS['nominal'].SetLineWidth(4)
        # observed + 1sigma
        doOBSplus = True
        if 'plus_base' in self.OBS:
           doOBSplus = False
           self.OBS['plus_base'].SetLineColor(color(self.OBS['colorLine']))
           self.OBS['plus_base'].SetLineStyle(1)
           self.OBS['plus_base'].SetLineWidth(2)        
        if 'plus_extra' in self.OBS:
           doOBSplus = False
           self.OBS['plus_extra'].SetLineColor(color(self.OBS['colorLine']))
           self.OBS['plus_extra'].SetLineStyle(1)
           self.OBS['plus_extra'].SetLineWidth(2)        
        if doOBSplus and 'plus' in self.OBS:
           self.OBS['plus'].SetLineColor(color(self.OBS['colorLine']))
           self.OBS['plus'].SetLineStyle(1)
           self.OBS['plus'].SetLineWidth(2)        
        # observed - 1sigma
        doOBSminus = True
        if 'minus_base' in self.OBS:
           doOBSminus = False
           self.OBS['minus_base'].SetLineColor(color(self.OBS['colorLine']))
           self.OBS['minus_base'].SetLineStyle(1)
           self.OBS['minus_base'].SetLineWidth(2)        
        if 'minus_extra' in self.OBS:
           doOBSminus = False
           self.OBS['minus_extra'].SetLineColor(color(self.OBS['colorLine']))
           self.OBS['minus_extra'].SetLineStyle(1)
           self.OBS['minus_extra'].SetLineWidth(2)        
        if doOBSminus and 'minus' in self.OBS:
           self.OBS['minus'].SetLineColor(color(self.OBS['colorLine']))
           self.OBS['minus'].SetLineStyle(1)
           self.OBS['minus'].SetLineWidth(2)        
     if self.EXP:
        # expected + 1sigma
        doEXPplus = True
        if 'plus_base' in self.EXP:
           doEXPplus = False
           self.EXP['plus_base'].SetLineColor(color(self.EXP['colorLine']))
           self.EXP['plus_base'].SetLineStyle(7)
           self.EXP['plus_base'].SetLineWidth(2)
        if 'plus_extra' in self.EXP:
           doEXPplus = False
           self.EXP['plus_extra'].SetLineColor(color(self.EXP['colorLine']))
           self.EXP['plus_extra'].SetLineStyle(7)
           self.EXP['plus_extra'].SetLineWidth(2)
        if doEXPplus and 'plus' in self.EXP:  
           self.EXP['plus'].SetLineColor(color(self.EXP['colorLine']))
           self.EXP['plus'].SetLineStyle(7)
           self.EXP['plus'].SetLineWidth(2)                
        # expected
        doEXP = True
        if 'nominal_base' in self.EXP:
           doEXP = False
           self.EXP['nominal_base'].SetLineColor(color(self.EXP['colorLine']))
           self.EXP['nominal_base'].SetLineStyle(7)
           self.EXP['nominal_base'].SetLineWidth(4)
        if 'nominal_extra' in self.EXP:
           doEXP = False
           self.EXP['nominal_extra'].SetLineColor(color(self.EXP['colorLine']))
           self.EXP['nominal_extra'].SetLineStyle(7)
           self.EXP['nominal_extra'].SetLineWidth(4)
        if doEXP and 'nominal' in self.EXP:
           self.EXP['nominal'].SetLineColor(color(self.EXP['colorLine']))
           self.EXP['nominal'].SetLineStyle(7)
           self.EXP['nominal'].SetLineWidth(4)
        # expected - 1sigma
        doEXPminus = True
        if 'minus_base' in self.EXP:
           doEXPminus = False
           self.EXP['minus_base'].SetLineColor(color(self.EXP['colorLine']))
           self.EXP['minus_base'].SetLineStyle(7)
           self.EXP['minus_base'].SetLineWidth(2)
        if 'minus_extra' in self.EXP:
           doEXPminus = False
           self.EXP['minus_extra'].SetLineColor(color(self.EXP['colorLine']))
           self.EXP['minus_extra'].SetLineStyle(7)
           self.EXP['minus_extra'].SetLineWidth(2)
        if doEXPminus and 'minus' in self.EXP:  
           self.EXP['minus'].SetLineColor(color(self.EXP['colorLine']))
           self.EXP['minus'].SetLineStyle(7)
           self.EXP['minus'].SetLineWidth(2)                
     # DRAW LINES
#.........这里部分代码省略.........
开发者ID:susy2015,项目名称:StatisticalTools,代码行数:101,代码来源:smsPlotABS.py

示例12: DrawLegend

    def DrawLegend(self):
        if(self.model.label2 == ""):
            offset = 0
        else:
            offset = -25
        xRange = self.model.Xmax-self.model.Xmin
        yRange = self.model.Ymax-self.model.Ymin
        
        LObs = rt.TGraph(2)
        LObs.SetName("LObs")
        LObs.SetTitle("LObs")
        if self.OBS: LObs.SetLineColor(color(self.OBS['colorLine']))
        LObs.SetLineStyle(1)
        LObs.SetLineWidth(4)
        LObs.SetMarkerStyle(20)
        LObs.SetPoint(0,self.model.Xmin+3*xRange/100, self.model.Ymax-1.35*yRange/100*10+offset)
        LObs.SetPoint(1,self.model.Xmin+10*xRange/100, self.model.Ymax-1.35*yRange/100*10+offset)

        LObsP = rt.TGraph(2)
        LObsP.SetName("LObsP")
        LObsP.SetTitle("LObsP")
        if self.OBS: LObsP.SetLineColor(color(self.OBS['colorLine']))
        LObsP.SetLineStyle(1)
        LObsP.SetLineWidth(2)
        LObsP.SetMarkerStyle(20)
        LObsP.SetPoint(0,self.model.Xmin+3*xRange/100, self.model.Ymax-1.20*yRange/100*10+offset)
        LObsP.SetPoint(1,self.model.Xmin+10*xRange/100, self.model.Ymax-1.20*yRange/100*10+offset)

        LObsM = rt.TGraph(2)
        LObsM.SetName("LObsM")
        LObsM.SetTitle("LObsM")
        if self.OBS: LObsM.SetLineColor(color(self.OBS['colorLine']))
        LObsM.SetLineStyle(1)
        LObsM.SetLineWidth(2)
        LObsM.SetMarkerStyle(20)
        LObsM.SetPoint(0,self.model.Xmin+3*xRange/100, self.model.Ymax-1.50*yRange/100*10+offset)
        LObsM.SetPoint(1,self.model.Xmin+10*xRange/100, self.model.Ymax-1.50*yRange/100*10+offset)

        textObs = rt.TLatex(self.model.Xmin+11*xRange/100, self.model.Ymax-1.50*yRange/100*10+offset, "Observed #pm 1 #sigma_{theory}")
        textObs.SetTextFont(42)
        textObs.SetTextSize(0.040)
        textObs.Draw()
        self.c.textObs = textObs

        if self.model.label2 == "T2tb":
           extraModelLabel1 = rt.TLatex(self.model.Xmin+65*xRange/100, self.model.Ymax-1.50*yRange/100*10+offset, "m_{#tilde{#chi}^{#pm}_{1}} - m_{#tilde{#chi}^{0}_{1}} = 5 GeV")
           extraModelLabel1.SetTextFont(42)
           extraModelLabel1.SetTextSize(0.030)
           extraModelLabel1.Draw()
           self.c.extraModelLabel1 = extraModelLabel1

        LExpP = rt.TGraph(2)
        LExpP.SetName("LExpP")
        LExpP.SetTitle("LExpP")
        if self.EXP: LExpP.SetLineColor(color(self.EXP['colorLine']))
        LExpP.SetLineStyle(7)
        LExpP.SetLineWidth(2)  
        LExpP.SetPoint(0,self.model.Xmin+3*xRange/100, self.model.Ymax-1.85*yRange/100*10+offset)
        LExpP.SetPoint(1,self.model.Xmin+10*xRange/100, self.model.Ymax-1.85*yRange/100*10+offset)

        LExp = rt.TGraph(2)
        LExp.SetName("LExp")
        LExp.SetTitle("LExp")
        if self.EXP: LExp.SetLineColor(color(self.EXP['colorLine']))
        LExp.SetLineStyle(7)
        LExp.SetLineWidth(4)
        LExp.SetPoint(0,self.model.Xmin+3*xRange/100, self.model.Ymax-2.00*yRange/100*10+offset)
        LExp.SetPoint(1,self.model.Xmin+10*xRange/100, self.model.Ymax-2.00*yRange/100*10+offset)
        
        LExpM = rt.TGraph(2)
        LExpM.SetName("LExpM")
        LExpM.SetTitle("LExpM")
        if self.EXP: LExpM.SetLineColor(color(self.EXP['colorLine']))
        LExpM.SetLineStyle(7)
        LExpM.SetLineWidth(2)  
        LExpM.SetPoint(0,self.model.Xmin+3*xRange/100, self.model.Ymax-2.15*yRange/100*10+offset)
        LExpM.SetPoint(1,self.model.Xmin+10*xRange/100, self.model.Ymax-2.15*yRange/100*10+offset)

        textExp = rt.TLatex(self.model.Xmin+11*xRange/100, self.model.Ymax-2.15*yRange/100*10+offset, "Expected #pm 1 #sigma_{experiment}")
        textExp.SetTextFont(42)
        textExp.SetTextSize(0.040)
        textExp.Draw()
        self.c.textExp = textExp

        if self.model.label2 == "T2tb":
           extraModelLabel2 = rt.TLatex(self.model.Xmin+65*xRange/100, self.model.Ymax-2.15*yRange/100*10+offset, "BR(#tilde{t} #rightarrow t #tilde{#chi}^{0}_{1}) = 50%")
           extraModelLabel2.SetTextFont(42)
           extraModelLabel2.SetTextSize(0.030)
           extraModelLabel2.Draw()
           self.c.extraModelLabel2 = extraModelLabel2

        LObs.Draw("LSAME")
        LObsM.Draw("LSAME")
        LObsP.Draw("LSAME")
        LExp.Draw("LSAME")
        LExpM.Draw("LSAME")
        LExpP.Draw("LSAME")
        
        self.c.LObs = LObs
        self.c.LObsM = LObsM
#.........这里部分代码省略.........
开发者ID:susy2015,项目名称:StatisticalTools,代码行数:101,代码来源:smsPlotABS.py

示例13: DrawLegend

    def DrawLegend(self):
        xRange = self.model.Xmax - self.model.Xmin
        yRange = self.model.Ymax - self.model.Ymin

        LObs = rt.TGraph(2)
        LObs.SetName("LObs")
        LObs.SetTitle("LObs")
        LObs.SetLineColor(1)
        LObs.SetLineStyle(1)
        LObs.SetLineWidth(4)
        LObs.SetMarkerStyle(20)
        LObs.SetPoint(0, self.model.Xmin + 3 * xRange / 100, self.model.Ymax - 1.35 * yRange / 100 * 10)
        LObs.SetPoint(1, self.model.Xmin + 10 * xRange / 100, self.model.Ymax - 1.35 * yRange / 100 * 10)

        LObsP = rt.TGraph(2)
        LObsP.SetName("LObsP")
        LObsP.SetTitle("LObsP")
        LObsP.SetLineColor(1)
        LObsP.SetLineStyle(1)
        LObsP.SetLineWidth(2)
        LObsP.SetMarkerStyle(20)
        LObsP.SetPoint(0, self.model.Xmin + 3 * xRange / 100, self.model.Ymax - 1.20 * yRange / 100 * 10)
        LObsP.SetPoint(1, self.model.Xmin + 10 * xRange / 100, self.model.Ymax - 1.20 * yRange / 100 * 10)

        LObsM = rt.TGraph(2)
        LObsM.SetName("LObsM")
        LObsM.SetTitle("LObsM")
        LObsM.SetLineColor(1)
        LObsM.SetLineStyle(1)
        LObsM.SetLineWidth(2)
        LObsM.SetMarkerStyle(20)
        LObsM.SetPoint(0, self.model.Xmin + 3 * xRange / 100, self.model.Ymax - 1.50 * yRange / 100 * 10)
        LObsM.SetPoint(1, self.model.Xmin + 10 * xRange / 100, self.model.Ymax - 1.50 * yRange / 100 * 10)

        textObs = rt.TLatex(
            self.model.Xmin + 11 * xRange / 100,
            self.model.Ymax - 1.50 * yRange / 100 * 10,
            "Observed #pm 1 #sigma_{theory}",
        )
        textObs.SetTextFont(42)
        textObs.SetTextSize(0.040)
        textObs.Draw()
        self.c.textObs = textObs

        LExp = rt.TGraph(2)
        LExp.SetName("LExp")
        LExp.SetTitle("LExp")
        LExp.SetLineColor(1)
        LExp.SetLineWidth(4)
        LExp.SetLineStyle(2)
        LExp.SetPoint(0, self.model.Xmin + 3 * xRange / 100, self.model.Ymax - 2.00 * yRange / 100 * 10)
        LExp.SetPoint(1, self.model.Xmin + 10 * xRange / 100, self.model.Ymax - 2.00 * yRange / 100 * 10)

        LExpP = rt.TGraph(4)
        LExpP.SetName("LExpPM")
        LExpP.SetTitle("LExpPM")
        LExpP.SetFillColor(color(self.EXP["colorArea"]))
        LExpP.SetLineStyle(3)
        LExpP.SetPoint(0, self.model.Xmin + 10, 43)
        LExpP.SetPoint(1, self.model.Xmin + 80, 43)
        LExpP.SetPoint(2, self.model.Xmin + 80, 27)
        LExpP.SetPoint(3, self.model.Xmin + 10, 27)

        LExpP.SetPoint(0, self.model.Xmin + 3 * xRange / 100, self.model.Ymax - 2.15 * yRange / 100 * 10)
        LExpP.SetPoint(1, self.model.Xmin + 10 * xRange / 100, self.model.Ymax - 2.15 * yRange / 100 * 10)
        LExpP.SetPoint(2, self.model.Xmin + 10 * xRange / 100, self.model.Ymax - 1.85 * yRange / 100 * 10)
        LExpP.SetPoint(3, self.model.Xmin + 3 * xRange / 100, self.model.Ymax - 1.85 * yRange / 100 * 10)

        textExp = rt.TLatex(
            self.model.Xmin + 11 * xRange / 100,
            self.model.Ymax - 2.15 * yRange / 100 * 10,
            "Expected #pm 1 #sigma_{experiment}",
        )
        textExp.SetTextFont(42)
        textExp.SetTextSize(0.040)
        textExp.Draw()
        self.c.textExp = textExp

        LObs.Draw("LSAME")
        LObsM.Draw("LSAME")
        LObsP.Draw("LSAME")
        LExpP.Draw("FSAME")
        LExp.Draw("LSAME")

        self.c.LObs = LObs
        self.c.LObsM = LObsM
        self.c.LObsP = LObsP
        self.c.LExp = LExp
        self.c.LExpP = LExpP
开发者ID:MT2Analysis,项目名称:PlotsSMS,代码行数:89,代码来源:smsPlotBrazil.py

示例14: DrawLines

    def DrawLines(self):
        # observed
        self.OBS['nominal'].SetLineColor(color(self.OBS['colorLine']))
        self.OBS['nominal'].SetLineStyle(1)
        self.OBS['nominal'].SetLineWidth(4)
        # observed + 1sigma
        self.OBS['plus'].SetLineColor(color(self.OBS['colorLine']))
        self.OBS['plus'].SetLineStyle(7)
        self.OBS['plus'].SetLineWidth(2)        
        # observed - 1sigma
        self.OBS['minus'].SetLineColor(color(self.OBS['colorLine']))
        self.OBS['minus'].SetLineStyle(7)
        self.OBS['minus'].SetLineWidth(2)        
        # expected + 1sigma
        self.EXP['plus'].SetLineColor(color(self.EXP['colorLine']))
        self.EXP['plus'].SetLineStyle(7)
        self.EXP['plus'].SetLineWidth(2)                
        # expected
        self.EXP['nominal'].SetLineColor(color(self.EXP['colorLine']))
        self.EXP['nominal'].SetLineStyle(1) 
        self.EXP['nominal'].SetLineWidth(4)        
        # expected - 1sigma
        self.EXP['minus'].SetLineColor(color(self.EXP['colorLine']))
        self.EXP['minus'].SetLineStyle(7)
        self.EXP['minus'].SetLineWidth(2)                        


		# Comment this block in for T2tt
        #self.OBS['OffShellnominal'].SetLineColor(color(self.OBS['colorLine']))
        #self.OBS['OffShellnominal'].SetLineStyle(1)
        #self.OBS['OffShellnominal'].SetLineWidth(4)
        #self.OBS['OffShellplus'].SetLineColor(color(self.OBS['colorLine']))
        #self.OBS['OffShellplus'].SetLineStyle(7)
        #self.OBS['OffShellplus'].SetLineWidth(2)        
        #self.OBS['OffShellminus'].SetLineColor(color(self.OBS['colorLine']))
        #self.OBS['OffShellminus'].SetLineStyle(7)
        #self.OBS['OffShellminus'].SetLineWidth(2)        
        #self.EXP['OffShellnominal'].SetLineColor(color(self.EXP['colorLine']))
        #self.EXP['OffShellnominal'].SetLineStyle(1) 
        #self.EXP['OffShellnominal'].SetLineWidth(4)        
        #self.EXP['OffShellplus'].SetLineColor(color(self.EXP['colorLine']))
        #self.EXP['OffShellplus'].SetLineStyle(7)
        #self.EXP['OffShellplus'].SetLineWidth(2)                
        #self.EXP['OffShellminus'].SetLineColor(color(self.EXP['colorLine']))
        #self.EXP['OffShellminus'].SetLineStyle(7)
        #self.EXP['OffShellminus'].SetLineWidth(2)                        
        #self.EXP['OffShellnominal'].Draw("LSAME")
        #self.EXP['OffShellplus'].Draw("LSAME")
        #self.EXP['OffShellminus'].Draw("LSAME")
        #self.OBS['OffShellnominal'].Draw("LSAME")
        #self.OBS['OffShellplus'].Draw("LSAME")
        #self.OBS['OffShellminus'].Draw("LSAME")
		## Comment this block in for T2tt

		## Comment this block in for T2bw050
        #self.EXP['Islandnominal'].SetLineColor(color(self.EXP['colorLine']))
        #self.EXP['Islandnominal'].SetLineStyle(1) 
        #self.EXP['Islandnominal'].SetLineWidth(4)        
        #self.EXP['Islandnominal'].Draw("LSAME")
		## Comment this block in for T2bw050

        self.EXP['nominal'].Draw("LSAME")
        self.EXP['plus'].Draw("LSAME")
        self.EXP['minus'].Draw("LSAME")
        self.OBS['nominal'].Draw("LSAME")
        self.OBS['plus'].Draw("LSAME")
        self.OBS['minus'].Draw("LSAME")        
开发者ID:sigamani,项目名称:Stops-AN-14-067,代码行数:67,代码来源:smsPlotABS.py

示例15: DrawLegend

    def DrawLegend(self):
        if(self.model.label2 == ""):
            offset = 0
        else:
            offset = -100
        xRange = self.model.Xmax-self.model.Xmin
        yRange = self.model.Ymax-self.model.Ymin
        
        LObs = rt.TGraph(2)
        LObs.SetName("LObs")
        LObs.SetTitle("LObs")
        LObs.SetLineColor(color(self.OBS['colorLine']))
        LObs.SetLineStyle(1)
        LObs.SetLineWidth(4)
        LObs.SetMarkerStyle(20)
        LObs.SetPoint(0,self.model.Xmin+3*xRange/100, self.model.Ymax-1.35*yRange/100*10+offset)
        LObs.SetPoint(1,self.model.Xmin+10*xRange/100, self.model.Ymax-1.35*yRange/100*10+offset)

        LObsP = rt.TGraph(2)
        LObsP.SetName("LObsP")
        LObsP.SetTitle("LObsP")
        LObsP.SetLineColor(color(self.OBS['colorLine']))
        LObsP.SetLineStyle(1)
        LObsP.SetLineWidth(2)
        LObsP.SetMarkerStyle(20)
        LObsP.SetPoint(0,self.model.Xmin+3*xRange/100, self.model.Ymax-1.20*yRange/100*10+offset)
        LObsP.SetPoint(1,self.model.Xmin+10*xRange/100, self.model.Ymax-1.20*yRange/100*10+offset)

        LObsM = rt.TGraph(2)
        LObsM.SetName("LObsM")
        LObsM.SetTitle("LObsM")
        LObsM.SetLineColor(color(self.OBS['colorLine']))
        LObsM.SetLineStyle(1)
        LObsM.SetLineWidth(2)
        LObsM.SetMarkerStyle(20)
        LObsM.SetPoint(0,self.model.Xmin+3*xRange/100, self.model.Ymax-1.50*yRange/100*10+offset)
        LObsM.SetPoint(1,self.model.Xmin+10*xRange/100, self.model.Ymax-1.50*yRange/100*10+offset)

        textObs = rt.TLatex(self.model.Xmin+11*xRange/100, self.model.Ymax-1.50*yRange/100*10+offset, 
                            "Observed #pm 1 #sigma_{theory}")
        textObs.SetTextFont(42)
        textObs.SetTextSize(0.040)
        textObs.Draw()
        self.c.textObs = textObs

        LExpP = rt.TGraph(2)
        LExpP.SetName("LExpP")
        LExpP.SetTitle("LExpP")
        LExpP.SetLineColor(color(self.EXP['colorLine']))
        LExpP.SetLineStyle(7)
        LExpP.SetLineWidth(2)  
        LExpP.SetPoint(0,self.model.Xmin+3*xRange/100, self.model.Ymax-1.85*yRange/100*10+offset)
        LExpP.SetPoint(1,self.model.Xmin+10*xRange/100, self.model.Ymax-1.85*yRange/100*10+offset)

        LExp = rt.TGraph(2)
        LExp.SetName("LExp")
        LExp.SetTitle("LExp")
        LExp.SetLineColor(color(self.EXP['colorLine']))
        LExp.SetLineStyle(7)
        LExp.SetLineWidth(4)
        LExp.SetPoint(0,self.model.Xmin+3*xRange/100, self.model.Ymax-2.00*yRange/100*10+offset)
        LExp.SetPoint(1,self.model.Xmin+10*xRange/100, self.model.Ymax-2.00*yRange/100*10+offset)
        
        LExpM = rt.TGraph(2)
        LExpM.SetName("LExpM")
        LExpM.SetTitle("LExpM")
        LExpM.SetLineColor(color(self.EXP['colorLine']))
        LExpM.SetLineStyle(7)
        LExpM.SetLineWidth(2)  
        LExpM.SetPoint(0,self.model.Xmin+3*xRange/100, self.model.Ymax-2.15*yRange/100*10+offset)
        LExpM.SetPoint(1,self.model.Xmin+10*xRange/100, self.model.Ymax-2.15*yRange/100*10+offset)

        if 'plus2' in self.EXP:
            LExpP2 = rt.TGraph(2)
            LExpP2.SetName("LExpP2")
            LExpP2.SetTitle("LExpP2")
            LExpP2.SetLineColor(color(self.EXP['colorLine']))
            LExpP2.SetLineStyle(3)
            LExpP2.SetLineWidth(2)  
            LExpP2.SetPoint(0,self.model.Xmin+3*xRange/100, self.model.Ymax-1.70*yRange/100*10+offset)
            LExpP2.SetPoint(1,self.model.Xmin+10*xRange/100, self.model.Ymax-1.70*yRange/100*10+offset)
        if 'minus2' in self.EXP:
            LExpM2 = rt.TGraph(2)
            LExpM2.SetName("LExpP2")
            LExpM2.SetTitle("LExpP2")
            LExpM2.SetLineColor(color(self.EXP['colorLine']))
            LExpM2.SetLineStyle(3)
            LExpM2.SetLineWidth(2)  
            LExpM2.SetPoint(0,self.model.Xmin+3*xRange/100, self.model.Ymax-2.3*yRange/100*10+offset)
            LExpM2.SetPoint(1,self.model.Xmin+10*xRange/100, self.model.Ymax-2.3*yRange/100*10+offset)


        if 'plus2' in self.EXP:
            textExp = rt.TLatex(self.model.Xmin+11*xRange/100, self.model.Ymax-2.15*yRange/100*10+offset,\
                                "Expected #pm 1 and 2 #sigma_{experiment}")
        else:
            textExp = rt.TLatex(self.model.Xmin+11*xRange/100, self.model.Ymax-2.15*yRange/100*10+offset,\
                    "Expected #pm 1 #sigma_{experiment}")

        textExp.SetTextFont(42)
#.........这里部分代码省略.........
开发者ID:CMSRA1,项目名称:PlotsSMS,代码行数:101,代码来源:smsPlotABS.py


注:本文中的color函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。