Updating X axis - takes 2 tries

In running the following script in both ROOT 3.10.02 and 4.00.08 on linux - the first time it is run - the x-axis is not updated… if we go ahead and run the full script a second time… the x-axis is updated and populated.

What are we doing wrong?

{

gROOT->Reset();

TFile f("/nfs/farm/g/glast/u01/italyOneTower/em_v3r0404p2/306000163/041008101639_svac.root", “READ”);

gStyle->SetTimeOffset(0);

TCanvas* c1 = new TCanvas;

Output->Draw(“TkrNumTracks:EvtSecond”, “”, “goff”, 100);
//Output->Draw(“TkrNumTracks:VtxZDir”, “TkrNumTracks>0”, “goff”, 100);

TGraph* gr = new TGraph(Output->GetSelectedRows(), Output->GetV2(), Output->GetV1());
gr->Draw(“A*”);

gr->GetXaxis()->SetTimeDisplay(1);
gr->GetXaxis()->SetTimeFormat("%H-%M");
gPad->Modified();

}

Call c1->Update() after gr->Draw
This will force the painting of the graph and the creation of the TAxis objects.
See Users Guide for more details and the Howto about basic graphics
root.cern.ch/root/HowtoDraw.html

Rene