{ //=========Macro generated from canvas: c1/c1 //========= (Mon Oct 9 18:00:32 2017) by ROOT version5.34/30 TCanvas *c1 = new TCanvas("c1", "c1",65,52,700,500); c1->Range(-4.470349e-07,489.85,60,772.75); c1->SetFillColor(0); c1->SetBorderMode(0); c1->SetBorderSize(2); c1->SetFrameBorderMode(0); c1->SetFrameBorderMode(0); TGraph *graph = new TGraph(5); graph->SetName("Graph0"); graph->SetTitle("Graph"); graph->SetFillColor(1); graph->SetPoint(0,10,537); graph->SetPoint(1,20,632.2000122); graph->SetPoint(2,30,624.4000244); graph->SetPoint(3,40,672.9000244); graph->SetPoint(4,50,725.5999756); TH1F *Graph_Graph1 = new TH1F("Graph_Graph1","Graph",100,6,54); Graph_Graph1->SetMinimum(518.14); Graph_Graph1->SetMaximum(744.46); Graph_Graph1->SetDirectory(0); Graph_Graph1->SetStats(0); Int_t ci; // for color index setting TColor *color; // for color definition with alpha ci = TColor::GetColor("#000099"); Graph_Graph1->SetLineColor(ci); Graph_Graph1->GetXaxis()->SetLabelFont(42); Graph_Graph1->GetXaxis()->SetLabelSize(0.035); Graph_Graph1->GetXaxis()->SetTitleSize(0.035); Graph_Graph1->GetXaxis()->SetTitleFont(42); Graph_Graph1->GetYaxis()->SetLabelFont(42); Graph_Graph1->GetYaxis()->SetLabelSize(0.035); Graph_Graph1->GetYaxis()->SetTitleSize(0.035); Graph_Graph1->GetYaxis()->SetTitleFont(42); Graph_Graph1->GetZaxis()->SetLabelFont(42); Graph_Graph1->GetZaxis()->SetLabelSize(0.035); Graph_Graph1->GetZaxis()->SetTitleSize(0.035); Graph_Graph1->GetZaxis()->SetTitleFont(42); graph->SetHistogram(Graph_Graph1); TF1 *gaus = new TF1("gaus","gaus",6,54); gaus->SetFillColor(19); gaus->SetFillStyle(0); gaus->SetLineColor(2); gaus->SetLineWidth(2); gaus->SetChisquare(1833.111); gaus->SetNDF(2); gaus->GetXaxis()->SetLabelFont(42); gaus->GetXaxis()->SetLabelSize(0.035); gaus->GetXaxis()->SetTitleSize(0.035); gaus->GetXaxis()->SetTitleFont(42); gaus->GetYaxis()->SetLabelFont(42); gaus->GetYaxis()->SetLabelSize(0.035); gaus->GetYaxis()->SetTitleSize(0.035); gaus->GetYaxis()->SetTitleFont(42); gaus->SetParameter(0,820.9914); gaus->SetParError(0,532.1895); gaus->SetParLimits(0,0,0); gaus->SetParameter(1,105.0385); gaus->SetParError(1,204.0671); gaus->SetParLimits(1,0,0); gaus->SetParameter(2,106.7502); gaus->SetParError(2,146.0913); gaus->SetParLimits(2,0,140.4945); graph->GetListOfFunctions()->Add(gaus); graph->Draw("al"); TPaveText *pt = new TPaveText(0.4397126,0.9342405,0.5602874,0.995,"blNDC"); pt->SetName("title"); pt->SetBorderSize(0); pt->SetFillColor(0); pt->SetFillStyle(0); pt->SetTextFont(42); TText *text = pt->AddText("Graph"); pt->Draw(); c1->Modified(); c1->cd(); c1->SetSelected(c1); }