Automatically adjust margins for TH2

Hi,

when we draw a TH2 object with the “COLZ” option, the Z-axis title is known to be outside of the canvas. In order to move it to the left, I usually use something like

myCanvas->SetRightMargin(0.18);

But it is tedious to do for each and every TH2 histogram I open in the TBrowser. Is there any way to automate it in the ~/.rootlogon.C, but only for those canvases that contain a TH2 (and the default parameters should be used otherwise)?


ROOT Version: 6.28/00
Platform: CentOS 7


There is no global setting for that. I suggest you make your own function which creates the canvas and adjusts its parameters as you like. Note that should be certainly something to be improved. I take note of it.

Thanks Olivier!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.