fourMs / MGT-python

Musical Gestures Toolbox for Python
https://www.uio.no/ritmo/english/research/labs/fourms/downloads/software/musicalgesturestoolbox/mgt-python/index.html
GNU General Public License v3.0
52 stars 11 forks source link

Make sure all matplotlib figures render images with white background #174

Closed balintlaczko closed 3 years ago

balintlaczko commented 3 years ago

This is a similar issue to #161, and it appears to affect all figures with matplotlib=3.3.3. The solution is to always specify:

fig.patch.set_facecolor('white')
fig.patch.set_alpha(1)
...
plt.savefig(outname, format='png', transparent=False)