class Plot: def __init__(self): self.log = PlotLog() def draw(self): self.stack.Draw('') self.dt_hist.Draw('E1 SAME') self.legend.Draw('SAME') def save(self, fout, w=550, h=400, log=True, fmt='png'): print 'Saving as:', fout+'.'+fmt cvs = TCanvas('', '', w, h) self.draw() cvs.SaveAs(fout+'.'+fmt) if log: self.log.save(fout+'.pylog')
class Plot: def __init__(self): self.log = PlotLog() def draw(self): self.stack.Draw('') self.dt_hist.Draw('E1 SAME') self.legend.Draw('SAME') def save(self, fout, w=550, h=400, log=True, fmt='png'): print 'Saving as:', fout + '.' + fmt cvs = TCanvas('', '', w, h) self.draw() cvs.SaveAs(fout + '.' + fmt) if log: self.log.save(fout + '.pylog')
def __init__(self): self.log = PlotLog()