Right and bottom margin for 3d histograms

Hi,

it seems like 3d histograms are immune to margin requests such as SetRightMargin(0.2). If I want some more room to the right and at the bottom of a 3d histogram, what would be the best way to achieve that?

Many thanks in advance,

Thomas

Example:
suppose in the following standard example I want to increase the right and bottom margins to avoid cut-off of some labels. The myCanvas->SetRightMargin(0.5); obviously has no effect!

{
   gROOT->Reset();
   TH3F *h3a = new TH3F("h3a","testa fitz",20,-4,4,20,-4,4,20,0,20);
   TH3F *h3b = new TH3F("h3b","testb fitz",20,-4,4,20,-4,4,20,0,20);
   for (Int_t i=0;i<10000>Gaus(0,1);
      Float_t y = gRandom->Gaus(0,1);
      Float_t z = gRandom->Gaus(10,4);
      h3a->Fill(x,y,z);
   }
   for (Int_t i=0;i<1000>Gaus(0,1);
      Float_t y = gRandom->Gaus(0,1);
      Float_t z = gRandom->Gaus(10,4);
      h3b->Fill(x,y,z);
   }
   h3a->SetMarkerColor(kBlue);
   h3b->SetMarkerColor(kRed);

   TCanvas *myCanvas = new TCanvas("myCanvas","Title",800, 600);
   myCanvas->SetRightMargin(0.5);
   myCanvas->cd();

   h3a->Draw("cont");      
   h3b->Draw("same");      
}

Can you send your file as attachement ? the code you sent in the body of your post is not working. There is syntax errors.

Of course. Sorry about that.

Thomas
test3d.C (753 Bytes)

Yes you are right, the margin is ignored on such plot. I will check.

This is now fixed in the CVS head. It was also wrong when the TH3 was drawn using options BOX or ISO. Thanks to have reported the problem and sorry again to have forgotten about it.