#include #include #include void test2() { TCanvas* c1 = new TCanvas(); TGraph graph; Double_t x[10], y[10]; for(int i=0; i< 10; i++) x[i]=y[i]=i; gPad->Clear(); graph.DrawGraph(10, x, y, "AL"); graph.SetTitle("test 2"); //don't work graph.GetXaxis()->SetTitle("energy"); //don't work graph.GetYaxis()->SetTitle("count"); //don't work graph.Draw("AL"); c1->Modified(); c1->Update(); }