sometimes it would be very helpful to see the number of entries per bin and its error of a profile in the small info bar below he canvas. Also, the integral as given by THistPainer::GetObjectInfo() is not really needed here.
Let me suggest the following code:
char* TProfile::GetObjectInfo(Int_t px, Int_t py) const {
// Redefines TObject::GetObjectInfo.
// Displays the profile info (bin number, contents, eroor, entries per bin
// corresponding to cursor position px,py
//
if (!gPad) return (char*)"";
static char info[64]
Double_t x = gPad->PadtoX(gPad->AbsPixeltoX(px));
Double_t y = gPad->PadtoY(gPad->AbsPixeltoY(py));
Int_t binx = GetXaxis()->FindFixBin(x);
sprintf(info,"(x=%g, y=%g, binx=%d, binc=%g, bine=%g, binn=%d)", x, y, binx, GetBinContent(binx), GetBinError(binx), GetBinEntries(binx));
return info;
}
For 2d profiles this could be done in a very similar way. What do you think?