{ TFile *f = new TFile("myGraph.root"); TGraph *myGraph = (TGraph*)f->Get("Graph"); for (int i = 0; i < myGraph->GetN(); i++) { cout << "{" << *(myGraph->GetX()+i) << "," << *(myGraph->GetY()+i) << "}, "; } // myGraph->Draw(); }