Changes in Histogram Fill Style When Saving a TCanvas


I am seeing a strange problem when saving a TCanvas. I have two histograms on the same canvas, and I use SetFillStyle(3004) on one of the histos so that the other histo can be seen behind it. This works okay when I view the canvas inside ROOT, but if I save the canvas as a .eps file then look at it using Ghostview, the hatched histogram has turned completely transparent!

On the TAttFill reference page I see:

If the current style fill area color is set to 0, then ROOT will force a black&white output for all objects with a fill area defined and independently of the object fill style.

So I tried using gStyle->SetFrameFillStyle(3004) and gStyle->SetHistFillStyle(3004), but neither changed the way the histo looks when it is saved.

How can I make the canvas in the .eps look the same as it does interactively?



See the warning on this page: … -interface
(near the middle of the page)