Need Help with TStyle

Hi All,
I have created a new TStyle and I load it in my rootlogon.C. But for some reason myStyle->SetFrameFillColor(0); does not work unless I go to StyleManager GUI and click Apply. I have even tried using gROOT->ForceStyle(kTRUE); and no luck.

Has anyone seen something like this?
Thanks,
Aram

Hi Aram,

Did you set your style using:

gROOT->SetStyle("myStyle"); if, for example, the name of the style created by you is ‘myStyle’?

Cheers, Ilka

Hi IIka,

In my rootlogon.C after defining
TStyle *myStyle= new TStyle(“MyStyle”,“Style”);

and setting different parameters I have the following lines:

gROOT->SetStyle(“MyStyle”);
gROOT->UseCurrentStyle();
gROOT->ForceStyle(kTRUE);

I should probably note that if I don’t use gROOT->ForceStyle(kTRUE); it does not set even the lable offsets and fonts for axises.
I have attached my rootlogon.C in case if you want to see it.
Thanks,
Aram.
rootlogon.C (5.25 KB)

Hi Aram,

Thank you for providing your rootlogon.C file. I can reproduce the reported problem and will investigate the reason.

Cheers, Ilka

Hi Ilka,

I have also noticed that after applying the style the font size for LaTex text changes to 50.
I don’t see how and where am I changing it. The very large text size gives more trouble than anything.

Regards,
Aram.

Hi Aram,

The reported case about myStyle->SetFrameFillColor(0) is fixed in cvs head and should work now. About TLatex case - could you provide an example that will help us to reproduce it.

Thank you, Ilka

Hi IIka,

Thanks for the fix.

To reproduce the latex :question: bug :question: , simply create some plot (let say a plot of TH1F) and apply to it the “MyStyle”. Then go to the Toolbar of the canvas and
click on “L” button and try to write something on the plot.

Thanks again,
Aram.

Hi Aram,
The reason might be related with the following settings in your style: myStyle->SetTextFont(132); myStyle->SetTextSize(23); The text size 23 should be in pixels (?) and in this case the text font should be 133, not 132, i.e. myStyle->SetTextFont(133); myStyle->SetTextSize(23);
My computer hangs several times with these settings in rootlogon.C.
Cheers, Ilka

[quote]myStyle->SetTextSize(0.05); [/quote] fixed it. I had generated that style from a canvas and [quote]myStyle->SetTextSize(23); [/quote]was there by default.
thanks,
Aram.