Axis titles not showing under Windows XP

Hello,

I have a small program that draws a few functions on canvases. I wrote it under Linux RH 7.3 with root 3.05/04 (GCC) and it worked fine. Now I’m at home trying to run it under XP (MSVC and root 3.03/09), but the axis titles don’t show. They do appear when I click Options -> Refresh from the canvas’ pull-down menu.
This is what I do:

TCanvas* c = new TCanvas(…);
TF1 f(…);
f->Draw();
f->GetHistogram()->SetXTitle(“x [cm]”);
gPad->IsModified();
gPad->Update();
c->IsModified();
c->Update();

I have the feeling this has been asked many times before (or something similar), but I coulnd’t find it in the archives, sorry.
Thanks for your help.

Paul

Hi Paul,

Replace the lines:

gPad->IsModified();
gPad->Update();
c->IsModified();
c->Update();

by
gPad->Modified();
gPad->Update();

Rene

Hello,

Thanks for your response, but the c->IsModified and c->Update I only added later to see if that might be the problem.

I’m attaching a small example program that reproduces the problem.

Thanks-

Paul
main.cpp (773 Bytes)

Paul,

Please read my presious post carefully.
IsModified is not the same as Modified !

Rene

Right…

It works now, thanks very much!

Paul