Hi Angela, Objects such as the histogram titles are redrawn automatically as soon as you change something in the pad. So your mods to the current object have no effect since a new object will be created. You can use the TStyle functions to specify: void SetTitleX(Float_t x=0); // to set the x start position in NDC void SetTitleY(Float_t y=1); // to set the y position in NDC [0,1] void SetTitleW(Float_t w=0); //to set the title box width void SetTitleH(Float_t h=0); //to set the title box height Rene Brun On Fri, 3 Dec 1999, Angela Biselli wrote: > Hi rooters, > I'm trying to move the title of the histogram and the stat box without > using the mouse(I'm plotting several histogram with a loop and I cannot do > it by hand) > I tried the following: > > hist->Draw(); > TPaveText *title = (TPaveText*)c1->GetPrimitive("title"); > title->SetY2(newy2); > title->SetX1(newx1); > title->SetX2(newx2); > title->SetY1(newy1); > c1->Modified(); > c1->Update(); > > but nothing happens. > If I check the X1 etc values (using Int_t aa=title->GetX1();)right > after setting them,they are what I > want;but after c1->Update(); they are back to the original values. > Is there a way to set the position of the title(and stats)before or after > drawing it? > > thanks > Angela >
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:43 MET