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

Comparing UserCode/OSUT3Analysis/Configuration/scripts/makeSinglePlot.py (file contents):
Revision 1.9 by lantonel, Tue Mar 26 14:03:02 2013 UTC vs.
Revision 1.10 by wulsin, Thu Mar 28 09:06:24 2013 UTC

# Line 22 | Line 22 | parser.add_option("--hist", action="stor
22                    help="plot as hollow histograms instead of error bar crosses")
23   parser.add_option("--line-width", dest="line_width",
24                    help="set line width (default is 2)")
25 + parser.add_option("--pdf", action="store_true", dest="plot_savePdf", default=False,
26 +                  help="save plot as pdf in addition")
27      
28  
29   (arguments, args) = parser.parse_args()
# Line 145 | Line 147 | if arguments.normalizeToUnitArea:
147  
148   outputFile.cd()
149   Canvas.Write()
150 <        
150 >
151 > if arguments.plot_savePdf:
152 >    pdfFileName = outputFileName.replace(".root", ".pdf")  
153 >    Canvas.SaveAs(pdfFileName)
154 >    print "Saved file:  " + pdfFileName  
155  
156  
157   for dataset in datasets_needed:
# Line 153 | Line 159 | for dataset in datasets_needed:
159      os.remove(dataset_file)
160  
161   outputFile.Close()        
162 + print "Saved plot in file: " + outputFileName  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines