Dear all,
I have encountered the problem, that there is a difference between the use of the UseCurrentStyle() command in a script and the root session:
I am setting the style to “Plain” and draw a histogram (see code below). This creates a read
“shadow” on the right and lower margin of the histogram. When I type myCanvas->UseCurrentStyle() in the root session, the shadow disappears. This command does not help, if I use it in a script. Since I need a few hundred frames for a movie, removing it by hand is not an option.
Code creating error:
{
gROOT->SetStyle(“Plain”);
gStyle->SetOptStat(kFALSE);
EFELD=new TH2D(“EFLED”,"",1001,-1.1,1.1,1001,-1.1,1.1);
EFELD->SetXTitle(“X”);
EFELD->SetYTitle(“Y”);
EFELD->GetXaxis()->CenterTitle();
EFELD->GetYaxis()->CenterTitle();
EFELD->GetYaxis()->SetTitleOffset(1.5);
EFELD->GetXaxis()->SetLabelOffset(0.015);
EFELD->Reset("");
EFELD->Draw();
//myCanvas->UseCurrentStyle(); // to see effect (or better: no effect), remove first //
}
The code is saved in E.c and executed using .x E.c in the Root-Session.
I have tried to use gPad->SetFillColor(kWhite); instead to create a white background, but this does not help.
Has anyone a solution to get rid of the read shadow using a script?
Best regards
Maciek
System in Use: Root Version 5.24, Phenom II X4 920, Windows XP Profesional Service Pack 3