Problem fitting axis labels in pad in custom GUI


Right now I’m working on developing a part of my GUI that displays waveform signals. I have a canvas that is divided into 16 equal sized pads and in each pad is a histogram. I adjusted the axis labels so that they would be bigger but now, they get cut off by the pad edge. I know that I can manually shrink the histogram frame size so that it all fits within the pad, but I can’t seem to figure out how to do that in my code. I guess I’m also uncertain if I should be changing the pad or frame.

Below is an example of what I’m trying to fix.

(Sorry for the poor quality)



try using the SetMargin-Methods of TCanvas/TPad, i.e.:

SetLeftMargin( double );
SetRightMargin( double );
SetTopMargin( double );
SetBottomMargin( double );

The values range from 0 to 1 and should be interpreted, afair,
relative from the respective side. So a border of 10%
would be left: 0.1, right: 0.1, bottom: 0.1, top: 0.1


PS: A practical approach to discover how design elements you change manually can be executed in code is to store the canvas to a .C - macro once before you make the changes and once after the changes and look at the diff between the two macros. :wink:

Hi Jochen,

Ah! Thank you very much. That does the trick. And thank you for the macro pointer too.