Hi,
I need to resize the TFrame of the histograms and graphs (TH1 and TGraph) created into a canvas. I need to do this with the methods of the classes, but I have not found anything. I need to resize the TFrame because I need to add some labels in the right side of the canvas that contains the histogram.
but it don’t work, because when a make an update of the canvas (i.e. with the mouse or with the c1.Modified(); c1.Update()) the are no resize of the frame and with f->GetX2() I obtain 100.
I have tried also with f->Draw() but the result is the same.
Hi,
it is really a trick with the margins !! But it seems to me to be ‘displayed histogram’ dependent. Does there exist a way to position it relatively in 0-1 region? Or one must first check the histogram ranges and then compute all the ranges and apply them… ?
thak you,
jaromir
I think the simple way is to create your own GUI based on either ROOT or Qt class libraries with the embedded TCanvas.
As soon as you satisfy “One histogram - one TCanvas” you may have placed and layouted the embedded TCanvas’ using the advanced GUI layout mechanzin rather the primitive TFrame manipulation.