Transparent Error Bands with plotOn()

Hello experts,

I am trying to plot a fit and its error bands with the following code:

model.plotOn(frame, ProjWData(sample,binnedData), Components("bkg*"), VisualizeError(*res));

I want the error band from VisulaizeError() to be transparent, but I was not able to find the proper option for this. I have seen that for histograms there is a SetFillColorAlpha(), but that did not work in the plotOn() function and I have also not found a FillStyle() that is properly transparent.

I would be delighted if someone could help!

I would define a transparent color and use it in plotOn();

I have tried this with the option

FillColor(TColor::GetColorTransparent(kAzure-7,0.3))

but the color is still solid, not transparent.

Have you seen this note in the TColor doc:

The transparency is available on all platforms when the flag OpenGL.CanvasPreferGL is set to 1 in $ROOTSYS/etc/system.rootrc , or on Mac with the Cocoa backend. On the file output it is visible with PDF, PNG, Gif, JPEG, SVG, TeX … but not PostScript.

Thank you, that worked!

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