wiso
October 15, 2010, 8:17pm
1
If I draw I TH2F with the option “text” how can I control the format of the numbers? In particular I want to limit the number of digits after to dot to 2.
brun
October 16, 2010, 5:41am
2
see documentation at : root.cern.ch/root/html/THistPainter.html#HP15
It says;
The TEXT and TEXTnn Option
For each bin the content is printed. The text attributes are:
* text font = current TStyle font (gStyle->SetTextFont()).
* text size = 0.02*padheight*markersize (if h is the histogram drawn with the option "TEXT" the marker size can be changed with h->SetMarkerSize(markersize)).
* text color = marker color.
By default the format “g” is used. This format can be redefined by calling gStyle->SetPaintTextFormat().
It is also possible to use “TEXTnn” in order to draw the text with the angle nn (0 < nn < 90).
Rene