# # The function "ls()" lists the directory contents of this file # fill.ls() # # Get object "sqroot" from the file. # sqroot = gROOT.FindObject('sqroot') sqroot.Print() # # Now fit histogram h1f with the function sqroot # h1f = gROOT.FindObject('h1f') h1f.SetFillColor(45) h1f.Fit('sqroot') # We now annotate the picture by creating a PaveText object # and displaying the list of commands in this macro # fitlabel = TPaveText(0.6, 0.3, 0.9, 0.80, 'NDC') fitlabel.SetTextAlign(12) fitlabel.SetFillColor(42) fitlabel.ReadFile(path.join(path.dirname(__file__), 'fit1_py.py')) fitlabel.Draw() c1.Update() gBenchmark.Show('fit1')
# # The function "ls()" lists the directory contents of this file # fill.ls() # # Get object "sqroot" from the file. # sqroot = gROOT.FindObject('sqroot') sqroot.Print() # # Now fit histogram h1f with the function sqroot # h1f = gROOT.FindObject('h1f') h1f.SetFillColor(45) h1f.Fit('sqroot') # We now annotate the picture by creating a PaveText object # and displaying the list of commands in this macro # fitlabel = TPaveText(0.6, 0.3, 0.9, 0.80, 'NDC') fitlabel.SetTextAlign(12) fitlabel.SetFillColor(42) fitlabel.ReadFile( path.join(str(gROOT.GetTutorialDir()), 'pyroot', 'fit1_py.py')) fitlabel.Draw() c1.Update() gBenchmark.Show('fit1')