Thanks to visit codestin.com
Credit goes to github.com

Skip to content

pgf backend doesn't make background transparent #11738

Closed
@gasteigerjo

Description

@gasteigerjo

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions