Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Matplotlib: How to make the background transparent?

I came across ways to make the plot itself transparent, but how do I make the background transparent? Is there a way to do this without Qt? I want the plot to be over the background window, for example, say I'm running Chrome, I want the plot to be over the chrome window, with its contents visible.

like image 739
vss Avatar asked Dec 28 '25 13:12

vss


1 Answers

If you save the plot as an image you can set the background to be transparent

myploy.savefig('plotname.png', transparent=True)
like image 59
Oisin O'Farrell Avatar answered Dec 31 '25 02:12

Oisin O'Farrell



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!