[ROOT-6841] TLegend Fill Color in TexDump Mode Created: 22/Oct/14  Updated: 23/Oct/14  Resolved: 23/Oct/14

Status: Closed
Project: ROOT
Component/s: Graphics
Affects Version/s: 5.34/21, 6.02/01
Fix Version/s: None

Type: Bug Priority: Medium
Reporter: Jean-François Caron Assignee: Olivier Couet
Resolution: Fixed Votes: 0
Labels: None

OSX 10.9.5

Attachments: File doc.tex     File doc.tex     File make_plot.py     File make_plot.py    


When saving a canvas using c1.SaveAs("foo.tex"), if a TLegend is present, the fill style for the legend icons is not respected, they are always black. The attached files should fully illustrate what is going on. You can run it as follows:
python make_plot.py
pdflatex plot.tex

Then look at the resulting pdf file. The legend icons are black, even though the objects in the legend have their FillColor set to 0.

Comment by Olivier Couet [ 22/Oct/14 ]

I'll check. But it could be that TeX graphics does not support the fill styles.

Comment by Jean-François Caron [ 22/Oct/14 ]

I tried changing the h and g objects in make_plot.py into TH1D and the problem goes away (i.e. the legend icon fill style is white).

Comment by Jean-François Caron [ 22/Oct/14 ]

I tried also with TGraphs, it looks like the problem it might be specific to TF1 entries in a TLegend... I will attach a new script & doc that illustrates.

Comment by Jean-François Caron [ 22/Oct/14 ]

New script & doc file to illustrate. Run "python make_plot.py" then "pdflatex doc.tex".

Comment by Olivier Couet [ 23/Oct/14 ]

Fixed in 5.34-patches 6.02-patches and root-trunk (6)
Thanks for reporting.

Generated at Mon Feb 24 15:57:27 CET 2020 using Jira 8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b.