_ROOT Version: 6.19
_Platform: OS 10.14.3
Hello, I’m plotting this: results2.pdf (29.6 KB) and I want to improve it.
What I want to do is to give each histogram the same transparency and have each histogram get progressively bluer, that way it will be easy to see when the histograms overlap and when they don’t.
To do this I made this:
step = 0.1 #this can be changed depending on how many histograms there are
for n in range(0,allHist):
colors[n] = TColor(TColor.GetFreeColorIndex(),0,0,n*step)
and it works, then I want to do something like this:
for n in range(0,allHist):
hist.SetFillColorAlpha(color[n],t) #t is the transparency
BUT when I try to run my code python complains that
TypeError: void TAttFill::SetFillColorAlpha(short fcolor, float falpha) =>
could not convert argument 1 (short int conversion expects an integer object)
And this is the problem.
For a second I thought that maybe I could use the ColorIndices, but I can’t find in the TColor documentation a method that returns you the ColorIndex of a TColor, but even if I could do that, I don’t think SetFillColorAlpha works like that, but, there must be a way to do this, right?