#include "TGraph.h" void example01(){ TGraph myData("dataset1.dat"); myData.Print(); // prints the content of the file int n=myData.GetN(); cout << "n=" << n << endl; // number of data points double xmin,ymin,xmax,ymax; xmin = myData.GetX()[0]; // accessing X and Y values ymin = myData.GetY()[0]; xmax = myData.GetX()[n-1]; ymax = myData.GetY()[n-1]; cout << "X Limits:"<< endl; cout << xmin << "\t" << ymin << endl; cout << xmax << "\t" << ymax << endl; cout << myData.Eval(22.) << endl; // interpolating }