The “e4” draw option doesn’t seem to work correctly for graphs, it seems to result in a very unsual fill. I’ve attached the output I get as a gif file (left pad option is “e3”, whereas “e4” is used for the right one).
My entire macro:
void graph()
{
TH1D* h1 = new TH1D("h1","h1",5,0,10);
for(int i=1; i<=5; i++)
{
double num = i-3.5;
h1->SetBinContent(i, exp(i));
}
TGraphAsymmErrors* g1 = new TGraphAsymmErrors(h1);
TGraph* g2 = new TGraph(h1);
TMultiGraph* m1 = new TMultiGraph("m1","m1");
TMultiGraph* m2 = new TMultiGraph("m2","m2");
for(int j=1; j<=5; j++)
{
int point = j-1;
double num1 = 0.5*h1->GetBinContent(j);
double num2 = 1.0*h1->GetBinContent(j);
g1->SetPointError(point,0.0,0.0,num1,num2);
}
g1->SetFillColor(2);
g2->SetLineColor(1);
m1->SetMinimum(-100.0);
m1->SetMaximum(500.0);
m1->SetTitle("e3 option");
m1->Add(g1,"e3");
m1->Add(g2,"l");
m2->SetMinimum(-100.0);
m2->SetMaximum(500.0);
m2->SetTitle("e4 option");
m2->Add(g1,"e4");
m2->Add(g2,"c");
TCanvas* c1 = new TCanvas("c1","c1",10,10,900,600);
c1->Divide(2,1);
c1->cd(1);
m1->Draw("a");
c1->cd(2);
m2->Draw("a");
c1->Print("c1.gif");
}