Adding text comments to histograms

sorry if this is a trivial question, but how can I add text to a histogram?

I’ve been trying a TText object:

TText t1;

with no luck, thanks

PS this link is down:

There is many examples in the tutorials directory of the ROOT distribution. They also are in the manual. An simple way to learn simple things like that, is to use the TCanvas graphics toolbar thanks to the menu View/Toolbar. Then you create a text by clicking on the L button. Then you save your canvas in a .C file with File/Save -> c1.C and you will get all the commands used to create the graphics you see in a macro (c1.C). That’s a very powerful way to learn the basic graphics objetcs in ROOT. If these hints do not help you send a small example in this forum showing your problem.

[quote=“kwd1”]PS this link is down:[/quote]
Where do you see this link? What’s the referring page?


I suppose you mean:


Hi Rene,
I’m trying to find out what page links this file using the wrong path.

It was this liunk

fixed now, thanks!