void test() { //=========Macro generated from canvas: c1/c1 //========= (Tue Nov 5 11:07:23 2019) by ROOT version 6.19/01 TCanvas *c1 = new TCanvas("c1", "c1",10,45,700,500); c1->Range(2.125,0.625,5.875,3.375); c1->SetFillColor(0); c1->SetBorderMode(0); c1->SetBorderSize(2); c1->SetFrameBorderMode(0); c1->SetFrameBorderMode(0); TMultiGraph *multigraph = new TMultiGraph(); multigraph->SetName(""); multigraph->SetTitle(""); Double_t _fx1001[1] = { 3}; Double_t _fy1001[1] = { 2}; Double_t _fex1001[1] = { 0}; Double_t _fey1001[1] = { 1}; TGraphErrors *gre = new TGraphErrors(1,_fx1001,_fy1001,_fex1001,_fey1001); gre->SetName(""); gre->SetTitle(""); gre->SetFillStyle(1000); TH1F *Graph_Graph1001 = new TH1F("Graph_Graph1001","",100,2.9,4.1); Graph_Graph1001->SetMinimum(0.8); Graph_Graph1001->SetMaximum(3.2); Graph_Graph1001->SetDirectory(0); Graph_Graph1001->SetStats(0); Int_t ci; // for color index setting TColor *color; // for color definition with alpha ci = TColor::GetColor("#000099"); Graph_Graph1001->SetLineColor(ci); Graph_Graph1001->GetXaxis()->SetLabelFont(42); Graph_Graph1001->GetXaxis()->SetLabelSize(0.035); Graph_Graph1001->GetXaxis()->SetTitleSize(0.035); Graph_Graph1001->GetXaxis()->SetTitleOffset(1); Graph_Graph1001->GetXaxis()->SetTitleFont(42); Graph_Graph1001->GetYaxis()->SetLabelFont(42); Graph_Graph1001->GetYaxis()->SetLabelSize(0.035); Graph_Graph1001->GetYaxis()->SetTitleSize(0.035); Graph_Graph1001->GetYaxis()->SetTitleFont(42); Graph_Graph1001->GetZaxis()->SetLabelFont(42); Graph_Graph1001->GetZaxis()->SetLabelSize(0.035); Graph_Graph1001->GetZaxis()->SetTitleSize(0.035); Graph_Graph1001->GetZaxis()->SetTitleOffset(1); Graph_Graph1001->GetZaxis()->SetTitleFont(42); gre->SetHistogram(Graph_Graph1001); multigraph->Add(gre,"p"); Double_t _fx1002[2] = { 4, 5}; Double_t _fy1002[2] = { 2, 2}; Double_t _fex1002[2] = { 0, 0}; Double_t _fey1002[2] = { 1, 1}; gre = new TGraphErrors(2,_fx1002,_fy1002,_fex1002,_fey1002); gre->SetName(""); gre->SetTitle(""); ci = TColor::GetColor("#ff0000"); gre->SetFillColor(ci); gre->SetFillStyle(3490); TH1F *Graph_Graph1002 = new TH1F("Graph_Graph1002","",100,3.9,5.1); Graph_Graph1002->SetMinimum(0.8); Graph_Graph1002->SetMaximum(3.2); Graph_Graph1002->SetDirectory(0); Graph_Graph1002->SetStats(0); ci = TColor::GetColor("#000099"); Graph_Graph1002->SetLineColor(ci); Graph_Graph1002->GetXaxis()->SetLabelFont(42); Graph_Graph1002->GetXaxis()->SetLabelSize(0.035); Graph_Graph1002->GetXaxis()->SetTitleSize(0.035); Graph_Graph1002->GetXaxis()->SetTitleOffset(1); Graph_Graph1002->GetXaxis()->SetTitleFont(42); Graph_Graph1002->GetYaxis()->SetLabelFont(42); Graph_Graph1002->GetYaxis()->SetLabelSize(0.035); Graph_Graph1002->GetYaxis()->SetTitleSize(0.035); Graph_Graph1002->GetYaxis()->SetTitleFont(42); Graph_Graph1002->GetZaxis()->SetLabelFont(42); Graph_Graph1002->GetZaxis()->SetLabelSize(0.035); Graph_Graph1002->GetZaxis()->SetTitleSize(0.035); Graph_Graph1002->GetZaxis()->SetTitleOffset(1); Graph_Graph1002->GetZaxis()->SetTitleFont(42); gre->SetHistogram(Graph_Graph1002); multigraph->Add(gre,"3"); multigraph->Draw("A"); multigraph->GetXaxis()->SetLimits(2.5, 5.5); multigraph->GetXaxis()->SetLabelFont(42); multigraph->GetXaxis()->SetLabelSize(0.05); multigraph->GetXaxis()->SetTitleSize(0.035); multigraph->GetXaxis()->SetTitleOffset(1); multigraph->GetXaxis()->SetTitleFont(42); multigraph->GetYaxis()->SetLabelFont(42); multigraph->GetYaxis()->SetLabelSize(0.05); multigraph->GetYaxis()->SetTitleSize(0.035); multigraph->GetYaxis()->SetTitleFont(42); c1->Modified(); c1->cd(); c1->SetSelected(c1); }