TAttFill::SetFillStyle() with 2001 and 4000+ arguments

Hi,

I’m trying to overlay some histograms, and I find that the 2001 and 4000+ arguments to TAttFill::SetFillStyle() do not seem to work - I just get “hollow” histograms.

Does anyone know if these arguments are known to work or if they have been deprecated?

I used ROOT 4.00.04 on a redhat 7.3 machine.

Best Regards,

Mike Kordosky

4000 means “tranparent”. So, seems to me, it is normal you get something hollow. Have you a little example showing what you think is wrong ?

Sure. See the enclosed script and outputs. I was a little confused when posting my original message. As it turns out, I can see some color in gv, but the gif file looks hollow and so does the root display. Also, the eps figure doesn’t look transparent, even with anti-aliasing off and when printed to hard copy.

By the way, the ability to upload figures is really great, but I find that
(1) I can’t upload figures with the .eps suffix… surely this is an omission
(2) I can only upload 3 figures. It would be nice if the number were increased to, say, 10.
Not sure if you are the guy to report this to though.

Best regards,

Mike Kordosky
fill_test.C (439 Bytes)


fill_4050.eps.gz (3.76 KB)

(1) It is not possible to read an eps file and put it in the canvas. is that what you mean by “upload” ?
(2) I am not aware of a such limitation. Have you an example showing it ?

PS: I am looking at your macro. I will let you know when I’ll have some news.

As stated in many places in the roottalk archive the trasnparency is not implemented on PS files . For instance see:

root.cern.ch/root/roottalk/roottalk03/0750.html

[quote=“couet”][quote]
(1) I can’t upload figures with the .eps suffix… surely this is an omission
(2) I can only upload 3 figures. It would be nice if the number were increased to, say, 10.
[/quote]

(1) It is not possible to read an eps file and put it in the canvas. is that what you mean by “upload” ?
(2) I am not aware of a such limitation. Have you an example showing it ?
[/quote]

I’m referring to uploading figures into the the forum (i.e. these messages). I found that it doesn’t accept files with extension .eps, which is why I had to gzip mine.

[quote=“couet”]As stated in many places in the roottalk archive the trasnparency is not implemented on PS files . For instance see:

root.cern.ch/root/roottalk/roottalk03/0750.html[/quote]

Ok, this isn’t a very big deal, but I didn’t get the behaviour I expected even when writing to a gif file. For example, see fill_4050.gif above. I wanted the individual histograms to be filled with color, but also somewhat transparent so that one histogram wouldn’t completely block another in the region in which they overlap. Maybe I misunderstand the option though. After reading the roottalk post I get the feeling that transparency applies to a TPad rather than the filled areas of histograms.

mike

Yes you are right, tranparency appllies to pads only. Here is an example:

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();
}