#!/usr/bin/python import time from ROOT import * f = TFile("r45275n0_r45275n1_vs_wire.root") f.cd() myStyle.cd() c_halfsize = TCanvas('c1','c1',0,0,1400,600) g = r45275n0_vs_wire g.GetXaxis().SetLabelSize(.07) g.GetYaxis().SetLabelSize(.07) g.GetYaxis().SetTitleOffset(.7) g.GetYaxis().SetTitleSize(.07) g.GetYaxis().SetNdivisions(404) r45275n0_vs_wire.Draw("AP") r45275n1_vs_wire.Draw("P") myLegend = TLegend(0.8,0.8,0.9,0.9) myLegend.SetBorderSize(1) myLegend.AddEntry( r45275n0_vs_wire, "r45275n0", "p") myLegend.AddEntry( r45275n1_vs_wire, "r45275n1", "p") myLegend.Draw() try: time.sleep(1E9) except KeyboardInterrupt: pass