Dear ROOTers,
I would like to draw two histograms superimposed with different fill
patterns (either using a THStack or just with the help of Draw("same").
This is illustrated with the small macro below.
One histogram should be printed with FillStyle 3004 and the other one with
3005. The problem, however, is that the 'smaller' histogram seems to be
transparent so that the resulting pattern is the overlay of pattern 3004
and 3005. This is the same on screen, in the postscript and on the
printout. I tried to set the transparency with FillStyle 4100, but this has
no effect at all.
How can I make the 'smaller' histogram being opaque?
[I am using the CVS Version on RH 7.2.1]
Regards,
Jochen
{
gROOT->Reset();
TH1F *h1 = new TH1F("h1","Histo 1",100,-3,3);
h1->FillRandom("gaus",10000);
TH1F *h2 = new TH1F("h2","Histo 2",100,-3,3);
h2->FillRandom("gaus",20000);
h1->SetFillStyle(3004);
h1->SetFillColor(1);
h2->SetFillStyle(3005);
h2->SetFillColor(1);
THStack *hs = new THStack("hs","A stack of histograms");
hs->Add(h1);
hs->Add(h2);
// Use this ...
hs->Draw();
// ... or this
//h2->Draw();
//h1->Draw("same");
// c1->Print("test.ps"); // uncomment to generate a postscript file
}
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:12 MET