Alignment of the content in a TPaveStats

Hello everyone,

I have a TPaveStats object in which the fitting results of two graphs were added in different colors, now the problem is the parameters are all aligned in the middle of their rows, may I ask is it possible to force them to be left aligned?

Thank you.

Do you have an example reproducing this behavior ?

    sprintf(textpar0,"%s = %5.3e #pm %3.1e",fcn->GetParName(0),fcn->GetParameter(0),fcn->GetParError(0));
    sprintf(textpar1,"%s = %5.3e #pm %3.1e",fcn->GetParName(1),fcn->GetParameter(1),fcn->GetParError(1));

1 Like

Thank you so much Olivier. But may I ask why, you changed colon sign(: ) to equals sign(=), then the problem solved, and the equals sign actually does not present in the drawing.

That’s an internal feature of TPaveStats, used to draw stats for histograms. It allows to align left the parameter name and align right the parameter value.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.