Transparency issue with matplotlib and wxpython

Hello

I would like some help to understand a problem with matplotlib and wxpython.

I am developping a GUI where my plots are embedded on wxPanels on a wxNotebook (tabs). Under Windows, some themes don't use a single colour but a gradient as the tab background. Therefore, I'd like to make the background of my plots transparent.

Under Windows XP (whatever the theme), when I set the facecolor of the plot to 'none', the plot background becomes transparent, but the parts of the panel and of the notebook below as well, and I end up seeing other windows behind my GUI or the Windows desktop. I was expecting the transparency to "stop" at the layer below the plot and therefore see the.

I did a second experiment, where I overlayed two plots. The top one is larger than the one below. I make the top one partially transparent, to see the one below. The transparency is "stopped" in the area of the inferior plot, I see the desktop on the remaining parts, and where there is no plot the background of my panel.

I'm attaching the code for the second experiment.

I'm running XP 32bits with the Classic theme, python 2.7.3, matplotlib 1.2.0 and wxpython 2.9.4-msw.

Thanks for your help

transp_panel.py (2.41 KB)

···

--
Sylvain

Hello again

expecting the transparency to "stop" at the layer below the plot and
therefore see the.

Sorry, I meant "therefore see the panel".

···

--
Sylvain