ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/OSUT3Analysis/Configuration/scripts/makeComparisonPlots.py
(Generate patch)

Comparing UserCode/OSUT3Analysis/Configuration/scripts/makeComparisonPlots.py (file contents):
Revision 1.2 by lantonel, Tue Jul 16 14:33:28 2013 UTC vs.
Revision 1.3 by lantonel, Fri Aug 2 11:25:53 2013 UTC

# Line 203 | Line 203 | def ratioHistogram( dataHist, mcHist, re
203              ratio.SetBinError(i+1,groupErr(g))
204  
205      ratio.GetYaxis().SetTitle("#frac{hist1-hist2}{hist2}")
206 +    ratio.GetXaxis().SetLabelOffset(0.03)
207      ratio.SetLineColor(1)
208      ratio.SetMarkerColor(1)
209      ratio.SetLineWidth(2)
# Line 267 | Line 268 | def MakeOneDHist(histogramName):
268                  Histogram.Rebin(RebinFactor)
269  
270          xAxisLabel = Histogram.GetXaxis().GetTitle()
271 <        unitIndex = xAxisLabel.find("[")
272 <        yAxisLabel = ""
273 <        if unitIndex is not -1: #x axis has a unit
274 <            yAxisLabel = "Entries / " + str(Histogram.GetXaxis().GetBinWidth(1)) + " " + xAxisLabel[unitIndex+1:-1]
271 >        unitBeginIndex = xAxisLabel.find("[")
272 >        unitEndIndex = xAxisLabel.find("]")
273 >
274 >        if unitBeginIndex is not -1 and unitEndIndex is not -1: #x axis has a unit
275 >            yAxisLabel = "Entries / " + str(Histogram.GetXaxis().GetBinWidth(1)) + " " + xAxisLabel[unitBeginIndex+1:unitEndIndex]
276          else:
277              yAxisLabel = "Entries per bin (" + str(Histogram.GetXaxis().GetBinWidth(1)) + " width)"
278          if arguments.normalizeToUnitArea:
# Line 292 | Line 294 | def MakeOneDHist(histogramName):
294              Histogram.SetMarkerColor(colors[colorList[colorIndex]])
295              Histogram.SetLineColor(colors[colorList[colorIndex]])
296              colorIndex = colorIndex + 1
297 <            if colorIndex is len(colorList)-1:
297 >            if colorIndex is len(colorList):
298                  colorIndex = 0
299          
300          markerStyle = 20

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines