#!/usr/bin/python
import time
from ROOT import *
f = TFile("bx_by_vs_.root")
f.cd()
myStyle.cd()
c = TCanvas()
c.cd()

bx_vs_profile.Fit('pol0','EM')
by_vs_profile.Fit('pol0','EM')

bx_vs_profile.Draw("e1p")
by_vs_profile.Draw("e1psame")
myLegend = TLegend(0.8,0.8,0.9,0.9)
myLegend.SetBorderSize(1)
myLegend.AddEntry( bx_vs_profile, "bx", "p")
myLegend.AddEntry( by_vs_profile, "by", "p")
myLegend.Draw()
try:
   time.sleep(1E9)
except KeyboardInterrupt:
   pass