I would like to know how to change the line thickness in TLegend (ROOT v5.02/00). In my code I am doing the following, where “h” is a TH1F*.
[code]h->SetLineColor(kRed);
h->SetLineWidth(2);
TLegend* leg = new TLegend(0.6, 0.5, 0.8, 0.7);
TLegendEntry* leg1 = leg->AddEntry(h, “some histogram”, “l”)
h->Draw();
leg->Draw();
[/code]
I can change the thickness of the plotted histogram line using
but this does not affect the thickness of the legend line. I also tried
which seems to make the line longer or shorter, without changing the thickness.
(I also tried changing the same thing substituting SetLineStyle() for SetLineWidth() and was not able to change the legend line style.)
Perhaps this is a bug? My opinion is that it would make sense for the default TLegend line style to automatically reflect the plotted line style…
Thanks!