[ROOT] FillStyle bug workaround?

From: Stephen Bailey (bailey@physics.harvard.edu)
Date: Wed Apr 18 2001 - 02:19:10 MEST


Help!

I need to make some black and white plots which use
various patterns to differentiate histograms instead
of using different fill colors.  Apparently there is
a bug in the use of fill styles which creates bogus
postscript output.  The effect varies from hanging ghostview
to simply not printing the pattern right.  Below is
a script which demonstrates the problem.  I'm running
2.25/03 on Linux, but I also tried a similar script
on 3.00/05.  Does anyone have a suggested workaround
for getting good postscript output for black and white
histograms which use fill patterns?

Thanks.

Stephen

{
TCanvas* c1 = new TCanvas("c1", "", 300, 300);

TH1F h1("h1", "", 50, -5, 5);
TH1F h2("h2", "", 50, -5, 5);

h1.SetFillColor(1); h2.SetFillColor(1);
h1.SetFillStyle(3004); 
h2.SetFillStyle(3005); 

h1.FillRandom("gaus", 2000);
h2.FillRandom("gaus", 1000);

h1.Draw();
h2.Draw("same");

c1->Print("temp.ps");
}



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:43 MET