Closed
Description
Bug report
Bug summary
When using the pgf backend the background cannot be set to transparent.
Code for reproduction
import matplotlib as mpl
mpl.use('pgf')
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.add_subplot(111)
ax.plot(range(10))
fig.savefig(f"test.png", transparent=True)
Actual outcome
A figure with white background.
Expected outcome
A figure with transparent background. This works when using a different backend (i.e. commenting out mpl.use('pgf')
).
Matplotlib version
- Operating system: Windows 10 x64
- Matplotlib version: 2.1.1 (installed with pip)
- Matplotlib backend: pgf
- Python version: 3.6.4