To move the frame top/down/left/right, you can use
TPad::SetTopMargin(0.1);
TPad::SetBottomMargin(0.2); //default is 0.1 (10 per cent of pad)
or if you prefer at the TStyle level
gStyle->SetPadBottomMargin(0.2);
> The second question is about getting axis information. How do I get
the
> range of the y-axis. I have tried
> ymax = p1->GetUymax();
> ymin = p1->GetUymin();
> and it doesn't seem to work. Neither does TPad::GetRangeAxis().
>
> Any ideas?
>
To get info about one axis, you must go via the object that has
created the axis. This is typically a TH1F or TH2F object.
For example, when you draw a 1-D histogram
h1->Draw();
you can access the axis objects with
TAxis *xaxis = h1->GetXaxis();
TAxis *yaxis = h1->GetYaxis()
then (look in TAxis.h)
Int_t nx = xaxis->GetNbins();
Float_t xmin = xaxis->GetXmin();
Float_t xmax = xaxis->GetXmax();
Float_t ymin = yaxis->GetXmin();
Float_t ymax = yaxis->GetYmax();
In the tutorials, we show several examples with histograms, graphs
with errors or not and the different ways to access the axis info.
Rene Brun