Hi Christian,
Either remove the hist->Draw() line or move teh style settings
before hist->Draw()
Rene Brun
On Tue, 2
Sep 2003 Christian.Hansen@cern.ch wrote:
>
> Dear Rooters,
>
> I would like to know how to change the default of
> showing fit-parameters in a standalone program.
>
> In a macro program that I run directly from root
> (with .x) I have these lines
> hist->Draw();
> gStyle->SetOptStat(0111);
> gStyle->SetOptFit(1111);
> hist->Fit("gaus");
> where I decide what statistical and fit-parameters will be shown.
> And it works...
>
> I would like to do the same in a standalone program
> for which I use the attached Makefile to compile.
>
> In a header file I've included
> #include "TStyle.h"
> and defined
> TStyle* m_gStyle;
>
> And in the .C file I do
> m_gStyle = new TStyle();
> and
> hist->Draw();
> m_gStyle->SetOptFit(1111);
> m_gStyle->SetOptStat(0111);
> hist->Fit("gaus");
> but nothing changes on the plot.
> I guess I actually do not change the default
> values since I don't get hold of the real 'gStyle'.
>
> How should I do this instead?
>
> With best regards
>
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:15 MET