-
Notifications
You must be signed in to change notification settings - Fork 225
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
Saved figure backgrounds are always transparent #234
Comments
I think this is the correct behavior, in the rcparams there is a separate setting for the facecolor of savefig. See https://stackoverflow.com/a/4805178/835607 Can you try it with: plt.rcParams['savefig.facecolor']='#111111' |
another check to isolate the cause is to try this with |
Yes - there is some version thing going on! I just tried with 3.2.1, and I got your backgrounds using your code. But using the save button next to the plot (which is what I was doing above) gives me a blue saved figure. So the button does something different from So it appears that this is a limitation of older matplotlib, and also the button in the widget behaves differently from |
oooh I see, I somehow missed that you using the button to save the plot. Indeed if use matplolibt from the terminal and try the save button it saves with a red background: I think that the underlying issue here is the same as #138 |
Great - thanks for tracking this down! |
Describe the issue
I'm not positive that this is ipympl and not matplotlib, but when I click the button to save the plot, the image always has a transparent background. Using
fig.patch.set_facecolor('#111111')
doesn't seem to help.Versions
The text was updated successfully, but these errors were encountered: