Hi,
This is very simple: When I plot one histogram (with a solid fill pattern) using “same”, the ticks on the axis are left behind and one cannot see them.
Here to illustrate the example:
{
TCanvas *C = new TCanvas("C","",800,600);
gStyle->SetOptStat(0);
TH1F *h1 = new TH1F("h1","",200,-5,5);
h1->SetFillStyle(1001);
h1->SetFillColor(38);
TH1F *h2 = new TH1F("h2","",200,-5,5);
h2->SetFillStyle(1001);
h2->SetFillColor(kGray+1);
Double_t a,b;
for (Int_t i=0;i<1e6;i++) {
gRandom->Rannor(a,b);
h1->Fill(a-1.5);
h2->Fill(b+1.5);
}
gPad->SetGridy();
gPad->SetGridx();
h1->Draw();
h2->Draw("same");
}
This also happens in 2D histograms.
Is there a way to put the axis lines and ticks on top of all the other objects drawn in the canvas?
It would be nice to have the grid lines on top too. Any help?
Cheers.