12from ROOT
import TCanvas, TGraph
15from array
import array
18c1 =
TCanvas(
'c1',
'A Simple Graph Example', 200, 10, 700, 500 )
24x, y = array(
'd' ), array(
'd' )
28 y.append( 10*sin( x[i]+0.2 ) )
29 print(
' i %i %f %f ' % (i,x[i],y[i]))
35gr.SetMarkerStyle( 21 )
36gr.SetTitle(
'a simple graph' )
37gr.GetXaxis().SetTitle(
'X title' )
38gr.GetYaxis().SetTitle(
'Y title' )
Option_t Option_t SetFillColor
A TGraph is an object made of two arrays X and Y with npoints each.