Hello all,
I want to change the properties of a PaveText of the title of a histogram in the canvas such as it fill color. I navigate through the roottalk I found some previous mails which helped me a bit. So I found a solution but the problem is that this is working when a execute it with root interactively but not within a macro. The line below pad->GetListOfPrimitives().Print() produces a different output in both context, and this list does not contain the title when using a macro.
Has anybody any idea of how to change the tite properties within a macro? Im using root version 5.14
thanks, carlos
{
TCanvas c2;
TH1F *h1 = new TH1F("h1","h1",100,0,1);
h1->Fill(0.2);
h1->Draw();
TPad *pad = c2.cd(0);
pad->GetListOfPrimitives().Print();
TPaveText *t1 = (TPaveText*) pad->GetPrimitive("title");
if(t1)
t1->SetFillColor(6);
}
Received on Thu Sep 13 2007 - 20:40:36 CEST
This archive was generated by hypermail 2.2.0 : Thu Sep 13 2007 - 23:50:02 CEST