TLegend and TArrow

Dear all,

I have some TArrow objects in my pad and I am trying to put them in the legend. The problem is that no matter which option I use ( l, p, f or e -> I tested all in order to see the effect ) in the AddEntry of TLegend I cannot have a proper arrow in the TLegend.

How can I do this in the TLegend?

I am using ROOT 5.99/04.


1 Like

I haven’t looked at the TLegend code, but from my experience and tests, I think that the TLegend only considers the line & fill properties of the objects such as color, fill style, thickness, etc. I don’t think it is possible to get an actual arrow drawn inside the legend.

It’d be similar to asking for a TGraph or TH1 entry in a TLegend to show up as a tiny little graph with the correct data points. That’s unless there is special code for dealing with TArrows specifically.


Thanks for your reply Jean-François.

Indeed it does not seem possible to have it with a simple command. I solved the problem by creating every detail of my legend with a set of TLine’s, TArrow’s, a TPave and some TText.