Skip to content

figure background color not respected by savefig() #17321

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nschloe opened this issue May 4, 2020 · 2 comments
Closed

figure background color not respected by savefig() #17321

nschloe opened this issue May 4, 2020 · 2 comments

Comments

@nschloe
Copy link
Contributor

nschloe commented May 4, 2020

The figure background color is not respected by savefig(). MWE:

import matplotlib.pyplot as plt

fig = plt.figure()
plt.plot([1, 2, 3], [1, 2, 3])

plt.gca().set_facecolor('#2d2d2d')
plt.gcf().patch.set_facecolor('#2d2d2d')

# plt.show()
plt.savefig("out.png")

show():
out1

savefig():
out

@anntzer
Copy link
Contributor

anntzer commented May 4, 2020

I think this is basically covered by #15111?

@nschloe
Copy link
Contributor Author

nschloe commented May 4, 2020

Right, duplicate of #7619.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants