root [0] TFile f("can.root") root [1] TCanvas* can = (TCanvas*)f.Get("can") root [2] gROOT->SetBatch(1) root [3] can->Draw()
{ int x[10], y[10]; int i; for(i = 0; i < 10; i++) {x[i] = 10*i;y[i] = i;} TGraph *gr = new TGraph(10,x,y); gr->Draw("AL"); TPaveLabel *hello = new TPaveLabel(0.2,0.4,0.8,0.6,"Hello World"); hello->Draw(); }