THStack and TCanvas and EPS files

I am trying to generate some THStacks to save with each of the histograms having a different color with their fill set to 3001. If I use the SaveAs or Print methods from TCanvas to write to a file with a eps file I get just black lines for the histos and no fill or color options. However when I just change that line to save a gif file, for example, it then saves all the color information. This is very frustrating. Can anybody give me a clue as to why this is acting this way? Thanks for any info.


The following are the two different lines that I was talking about.

//  can->Print(filename.c_str(), "eps Landscape Preview");
//  can->Print("blah.gif", "Landscape, Preview");

Patterns from 3001 to 3020 work also with PS and PDF see the attached PS file.

I guess you are trying to view your file using “gv”. When a PostScript file is visualized with gv the patterns and hatches do not appear. This is a known bug in gv: by default gv visualizes PostScript files with anti-aliasing turned ON. Turn it OFF (by pressing the key “a” in the gv window) and the patterns will appear. The patterns appear correctly when the file is printed.

To disable the anti-aliasing by default in gv you can put the line:

GV.antialias: False

in the ~/.gv file. (38 KB)