Weird text alignment in TLegend

Hi folks,

I find that there is weird/unpredictable alignment between the marker and the text label in TLegends. Here’s the current example I’m looking at:

Screenshot 2020-05-14 at 15.59.41

Don’t worry about the tiny text between entries - the larger text and the coloured lines are what’s made by a TLegend.

You’ll notice that some entries have the line nicely aligned with the middle of the text (‘Dijet TLA’), some have the text shifted down relative to the line (bbbar and ttbar), and some have the line near the bottom (‘Dijet’).

Is there a reason for this? Is my canvas too few pixels to do this more cleanly or something? How could I improve this situation?


You may find the following old topic useful: Proper alignment of text bin labels

Thanks - for now I’ve added a white “_{y}” to everything that is too low to bump it up a bit… ugly but works.

Can you provide the macro reproducing this problematic legend ?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.