/// \file /// \ingroup tutorial_graphs /// \notebook /// Draw a simple graph. /// /// \macro_image /// \macro_code /// /// \author Rene Brun void graph() { TCanvas *c1 = new TCanvas("c1","A Simple Graph Example",200,10,700,500); c1->SetGrid(); const Int_t n = 6; Double_t x[n]= {3,4,5,8,10,13}; Double_t y[n]= {0.0628,0.061452,0.056987,0.062014,0.061208,0.061317}; TGraph *gr = new TGraph(n,x,y); gr->SetLineColor(2); gr->SetLineWidth(2); gr->SetMarkerColor(4); gr->SetMarkerStyle(21); gr->SetTitle("#sigma(e^{+}e^{-}#rightarrowZHH) vs tan#beta"); gr->GetXaxis()->SetTitle("t_{#beta}"); gr->GetYaxis()->SetTitle("#sigma(fb)"); gr->Draw("ACP"); // TCanvas::Update() draws the frame, after which one can change it c1->Update(); c1->GetFrame()->SetBorderSize(12); c1->Modified(); }