Hello,
I am plotting a 1-d histogram (TH1F) using the “E4” command as done below.
{
TCanvas *ce4 = new TCanvas("ce4","ce4",600,400);
TH1F *he4 = new TH1F("he4","Distribution drawn with option E4",100,-3,3);
Int_t i;
for (i=0;i<10000;i++) he4->Fill(gRandom->Gaus(0,1));
he4->SetFillColor(kRed);
he4->GetXaxis()->SetRange(40,48);
ce4->cd(1);
he4->Draw("E4");
ce4->cd(2);
}
However, I’d like to fill in the body of the histogram in kBlue. The closest I can think of is doing
he4->SetFillColor(kBlue) ;
he4->DrawCopy("HIST,SAME") ;
but then I get an ugly blocky histogram and not a smoothed curve. Does anyone know how to draw a smoothed filled histogram?
thanks,
Tae Min