/// \file /// \ingroup tutorial_graphs /// \notebook /// Create and Draw a TMultiGraph. /// /// \macro_image /// \macro_code /// /// \author Rene Brun void multigraph() { gStyle->SetOptFit(); auto c1 = new TCanvas("c1","multigraph",700,500); c1->SetGrid(); TMultiGraph *mg = new TMultiGraph(); const Int_t n = 9; TGraph *g[4]; Double_t x[] = {3,4,5,6,7,8,9,10,13}; Double_t y[] = {0.0628,0.061452,0.063120,0.063767,0.061335,0.062015,0.061703,0.061212,0.06131}; //ZHH Double_t y1[]= {0.13103,0.13100,0.13097,0.13100,0.13101,0.13102,0.13101,0.13098,0.13103};//Zhh Double_t y2[]= {0.0019594,0.00018931,0.0086724,0.021247,0.00032299,0.0052182,0.0029998,0.00008205,0.00088232};//AHH Double_t y3[]= {0.0095336,0.0056419,0.010511,0.012600,0.0053731,0.0071720,0.0063103,0.0050548,0.0052905};//AHh int i=0; g[i] = new TGraph(n, x, y); g[i]->SetLineColor(2); g[i]->SetLineWidth(4); g[i]->SetMarkerColor(4); g[i]->SetMarkerStyle(20); mg->Add(g[i]); i++; g[i] = new TGraph(n, x, y1); g[i]->SetLineColor(3); g[i]->SetLineWidth(4); g[i]->SetMarkerColor(3); g[i]->SetMarkerStyle(21); mg->Add(g[i]); g[i] = new TGraph(n, x, y2); g[i]->SetLineColor(4); g[i]->SetLineWidth(4); g[i]->SetMarkerColor(4); g[i]->SetMarkerStyle(21); mg->Add(g[i]); g[i] = new TGraph(n,x,y3); g[i]->SetLineColor(6); g[i]->SetLineWidth(4); g[i]->SetMarkerColor(6); g[i]->SetMarkerStyle(21); mg->Add(g[i]); // mg->SetTitle("#sigma(e^{+}e^{-}#rightarrowZHH) vs tan#beta"); mg->GetXaxis()->SetTitle("t_{#beta}"); mg->GetYaxis()->SetTitle("#sigma(fb)"); mg->GetXaxis()->SetLimits(2,14); //mg->GetYaxis()->SetLimits(0.00001,0.1); //mg->GetXaxis()->CenterTitle(true); //mg->GetYaxis()->CenterTitle(true); // mg->Draw("apl"); mg->Draw("ACP"); //force drawing of canvas to generate the fit TPaveStats c1->Update(); c1->GetFrame()->SetBorderSize(12); c1->Modified(); // c1->RedrawAxis("G"); }