Displaying a table of numbers on a graph/histogram

Hi,

I’m trying to display a table of numbers on a graph with a Tlatex
object below, but it’s taking a while to get things to line up. Does anyone know a better way?

Thanks,
Matt :slight_smile:

   char area[200], chi_sq[200], parErrors[200][5];
   sprintf(area, "Background Subtracted Area \t %.3f ( %.3f )", cArea , nArea);
   sprintf(chi_sq, "Chi-Squared \t %.3f ( %.3f )", cchisquared, nchisquared);

   TPad *newpad = new  TPad("newpad", "Transparent Pad",0,0,1,1);
   newpad->SetFillStyle(4000); //4000 Make Transparent, 4100 opaque
   newpad->Draw();   
   newpad->cd();
   TLatex l;
   l.SetTextColor(1);
   l.SetTextSize(0.02);
   l.SetTextAlign(23);
   l.DrawLatex(0.32,.83,area);
   l.DrawLatex(0.35,.81,chi_sq);

Could you send a running script illustrating your problem?
See examples with TLatex in tutorials latex.C, latex2.C, latex3.C

Rene