from ROOT import TGraphfrom ROOT import kRedfrom array import arraygr1 = TGraph('data.txt') # xs,ysgr1.SetLineColor(kRed)gr1.Draw()xs = array('d',[0,1,2,3])ys = array('d',[0,1,2,3])gr2 = TGraph(len(xs),xs,ys)gr.Draw()