Dear Phillipe, Thanks for your help. Actually, I did not konw that modification of the gStyle would only affect histograms that are 'created' after the modification. This was not the case for v3_02_06, but you are right that it appears to be the case for v3_03_07. I had played with moving the gStyle modification around in the .cint file, but I did not move it far enough. When I move it before the histogram creation things work fine. Thanks, Robert Philippe Canal wrote: > > Hi Robert, > > As you probably know, modification of the gStyle objects will only > affect histogram that are 'created' after their execution. In > particular it does not affect histogram read from file. > > To actually change those values for an existing histogram you would > need to do (in v3_03_09b and maybe v3_03_07c): > > TPaveStats* stat = > (TPaveStats*)myhist->GetListOfFunctions()->Find("stats"); > stat->SetOptFit(1011); > > In addition, you may have to insure that the canvas refresh itself. > For a canvas pointer c1: > > c1->Modified(); c1->Update(); > > Cheers, > Philippe > > -----Original Message----- > From: Robert Harris [mailto:rharris@fnal.gov] > Sent: Wednesday, October 16, 2002 4:11 PM > To: roottalk@root.cern.ch > Cc: cdf_software_help@fnal.gov; rharris@fnal.gov; pcanal@fnal.gov > Subject: Problem with SetOptFit and SetOptStat in v3_03/07 and v3_03/09 > > Dear RootTalk, > > In v3_03/07 and v3_03/09 when I try to print fit statistics on the histogram > using > gStyle->SetOptFit(1011) > > or change the content of the statistics printout using > gStyle->SetOptStat(11); > > there is *no* change to the printed histogram. The box always contains the > histogram name, number of entries, mean and RMS regardless of what I do. > > However, both the above commands work in v3_02/06. For version v3_02/06 > I can get fit parameters printed and I can change the content of the > statistics box to > include only the name and number of entries. > > Specifically, I am using Fermilab version v3_03_09a, v3_03_07c, and > v3_02_06b. > > Is there some other way I am supposed to change the statistics and fit > printing > on the histograms in the more recent versions of root? > > Thanks, > Robert
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:14 MET