Hi!
I start a new thread although it’s a kind of follow up on [url]Unable to set pad to logarithmic scale using THStack pads
I would like to move the palette according to the right margin I set. Usually the pallete follows the right margin. But not in my case.
I’m probably missing again the right spot to call for Update.
margin() {
TH2F* h1 = new TH2F("h1","h1",100,-5,5, 100, -5, 5);
h1->FillRandom("gaus");
TH2F* h2 = new TH2F("h2","h2",100,-5,5, 100, -5, 5);
h2->FillRandom("gaus");
THStack* stack = new THStack("hstack","hstack");
stack->Add(h1,"colz");
stack->Add(h2,"colz");
gStyle->SetOptStat(0);
c2 = new TCanvas("c2","c2");
stack->Draw("pads");
gPad->Update();
c2->cd(1);
gPad->SetRightMargin(0.5); // disabled for margin1.png, enabled for margin2.png
gPad->SetLogz(1);
}
I know that if I access the pallete directly I can set its NDC (movepal.C example). I would not like to do it because at the end I will use THStack from TH2 or TH3 (projections) so I don’t have the histogram pointers at hand.
Thanks in advance,
Sebastian
PS: ROOT 5.30.00