Histograms drawn in pads without margins

Dear rooters,

how does one set the pad margins to 0?

gStyle->SetPadTopMargin(0.0);

is not complaining, but seems not to work. I would like to save my histograms drawn in pads without margins

Thanks!

Hello,
if you replace gStyle by gPad

does it work?

Well, I think I’ve been using:
MyCanvas->SetTopMargin(0);
gPad->SetTopMargin(0);
Note … if you call TPad::Divide (Int_t nx = 1, Int_t ny = 1, Float_t xmargin = 0.01, Float_t ymargin = 0.01, Int_t color = 0) … you will get “margins” between subpads, unless you explicitly change them in this call (just pay attention to the “special case xmargin <=0 and ymargin <=0”) …
Note also … there exists also the TStyle::SetHistTopMargin (Double_t hmax = 0.05)