TGraphs with alpha fill color behave strangely after many instances

Hi rooters,

I noticed unexpected behavior when drawing many TGraphs which include a transparent fill color (i.e. SetFillColorAlpha). Eventually, after creating/saving many TGraphs, the transparent fill color becomes a white color. And, after many more TGraphs, the transparent fill color becomes semi-random, and then eventually becomes my intended color.

I attached a python script (75 LOC) which reproduces this behavior. It takes about 30 seconds to run, and it produces a pdf which I attached. I tested with linux and mac, and the pdf appears the same on those platforms. The features of the pdf are:

Pages 1 - 35: the TGraphs are drawn as expected
Pages 36 - 71: the TGraphs have white fill
Pages 72 - 73: the TGraphs have semi-random fill
Pages 74 - 99: the TGraphs are drawn as expected

Has anyone seen this before?

I’m sorry if this has been reported elsewhere, or already fixed. I googled briefly and found no matching results. Thanks very much for your help.

Alex
alpha.pdf (1.5 MB)
alpha.py (1.9 KB)


ROOT Version: 6.24/06
Built for linuxx8664gcc on Sep 02 2021, 14:20:23
From tags/v6-24-06@v6-24-06


ROOT Version: 6.24/06
Built for macosx64 on Sep 02 2021, 14:20:23
From tags/v6-24-06@v6-24-06

I get 100 similar blue grids with your script. I think this has been fixed by Improve GetColorTransparent. by couet · Pull Request #10314 · root-project/root · GitHub

Thanks very much for checking, @couet ! I see this PR isn’t part of a tagged release yet, but I am happy to update whenever that is available.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.