Transparent paves

Hi,

I would like to draw a rectangular or a more general shaped error band
on top of my data. Let’s say in light grey.

In order to still see my date points this band must be transparent. Unfortunately

TPave p = TPave(0,0,1,1);
p.SetFillStyle(4000);
is not working as promised (to be sure I tried also 4100 without success.
What’s wrong? And how can I realize a more general shape.

cheers
Mario

Use fill styles 3000->3025
see: root.cern.ch/root/htmldoc/TAttFill.html
Try also with the graphics editor

Rene

the patterns do work somehow, but not too well as there are not really transparent.

0 : hollow
1001 : Solid
2001 : hatch style
3000+pattern_number (see below)
4000 :the window is transparent.
4000 to 4100 the window is 100% transparent to 100% opaque

This transparency mode (4000 for fill style) works for Pad only. Moreover it is implemented for output on screen only. Try the following macro and save it in a PS file, you will see that the transparency is gone. So I think you should follow Rene’s advice.


void opaq()
{
   TCanvas *c = new TCanvas();
   c->SetFillColor(5);
   TPad *p1 = new TPad("p1", "p1", 0.1, 0.1, 0.5, 0.5);
   p1->SetFillColor(2);
   p1->Draw();
                                                                                
   c->cd();
                                                                                
   TPad *p2 = new TPad("p2", "p2", 0.5, 0.5, 0.9, 0.9);
   p2->SetFillColor(4);
   p2->Draw();
                                                                                
   TPad *p3 = new TPad("p3", "p3", 0.3, 0.3, 0.7, 0.7);
   p3->SetFillColor(3);
   p3->SetFillStyle(4050);
   p3->Draw();
                                                                                
   p3->cd();
   TEllipse *ellipse = new TEllipse(0.45, 0.45, 0.19, 0.19, 0, 360, 0);
   ellipse->Draw();
}

Why can this feature not be preserved in .ps file?

regards,

Mario

This page may help you:
couet.home.cern.ch/couet/root/ht15.html