Hi Rooters,
When running the macro below , one sees that the x-axis is blank.
However, activating the "step /= 10.0" line, suddenly results in
a legible x-axis. How comes ??
Best Regards, Eddy
{
gStyle->SetTimeOffset(0);
Int_t nrPoints = 261;
Axis_t xlo = 351406800.00;
Axis_t xhi = 980398800.00;
Axis_t span = xhi-xlo;
Axis_t step = span/(nrPoints-1);
// step /= 10.0;
TH1D *h = new TH1D("example","example",nrPoints,xlo-0.5*step,xhi+0.5*step);
for (Int_t i = 0; i < nrPoints; i++)
h->SetBinContent(i+1,Double_t(i));
h->GetXaxis()->SetTimeDisplay(1);
h->GetXaxis()->SetTimeFormat("%m/%y");
h->Draw();
}
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:37 MET