How to display only some fit parameters in PaveStats box

Hello, I read in the TPaveStats documentation that if I want to display only non-fixed parameters,I have to specify the value 1 for the fourth value of gStyle->SetOptFit(). SO if I understand well, something like gStyle->SetOptFit(1111) should display only the value of the non-fixed parameters. However, I have an user function with 6 parameters (4 are fixed and 2 are free). My problem is I would like to display only the value of the two free parameters but if I put the value 1 to SetOptFit() function, all the parameters are displayed. My parameters are fixed using somethinf like

Do I something wrong?
Thanks in advane for your help.

Do you have a example showing this ?

I’m having what sounds like the same problem…here’s the relevant code snippet:

/* First line of my function */
gStyle -> SetOptFit(1111);
/* Non-drawing stuff */
TGraphErrors *dataGoodErrs = new TGraphErrors(ii, dTime, dFlou, timeErr, flouErr);                           
dataGoodErrs -> Draw("A*");
/* Perform a fit with the TVirtualFitter class */
TF1 *fitFunc = new TF1("opFit", opFit, negL, op_tmax, 6);
  for (int i = 0; i < 6; i ++) {
    fitFunc -> SetParName(i, fitter -> GetParName(i));
  fitFunc -> SetChisquare(chi2);
  fitFunc -> SetNDF(ndf);
  fitFunc -> SetParameters(minParams);
  fitFunc -> SetParErrors(parErrors);
  fitFunc -> FixParameter(kBackground, fitFunc -> GetParameter(kBackground));
  fitFunc -> FixParameter(kDetune, fitFunc -> GetParameter(kDetune));
  fitFunc -> FixParameter(kt_0, fitFunc -> GetParameter(kt_0));
  printf("Drawing with optFit = %d\n", gStyle -> GetOptFit());
  fitFunc -> Draw("SAME");

The print statement produces: Drawing with optFit = 1111

but all the paramaters are displayed.

Thanks in advance for your help!


   h1 = new TH1F("h1","h1",200,-10,10);

   int i;
   for (i=0;i<=10000;i++) {
gStyle -> SetOptStat(0);
gStyle -> SetOptFit(11);