In the next script the option “same” does not work at all:
TH2D h = new TH2D(“h”,“hfun”,10,-1.,1.,10,-1.,1.);
const Int_t n = 1000000;
for (Int_t i=0;i<n;i++) {
Double_t x = -1.+2gRandom->Rndm();
Double_t y = -1.+2gRandom->Rndm();
Double_t z = abs(sin(x)(1.+cos(y)));
h->Fill(x,y,z);
}
h->SetFillColor(3);
h->DrawCopy(“LEGO1”);
h->SetFillColor(7);
h->GetXaxis()->SetRange(5,6);
h->GetYaxis()->SetRange(4,7);
h->DrawCopy(“sameLEGO1”);