You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When check_figures_equal is used as a decorator, the default behavior is to remove any background color during savefig, so plots which should have a different background color can't be properly compared.
For example, code that should produce a figure with a black background and the reference figure would both be saved as a white background.
running with pytest shows a passing test, even though the test_fig should have a black background and the reference figure has a white background. These are both changed to white in savefig
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!
Bug report
Bug summary
When
check_figures_equal
is used as a decorator, the default behavior is to remove any background color duringsavefig
, so plots which should have a different background color can't be properly compared.For example, code that should produce a figure with a black background and the reference figure would both be saved as a white background.
Code for reproduction
Actual outcome
running with pytest shows a passing test, even though the test_fig should have a black background and the reference figure has a white background. These are both changed to white in
savefig
Expected outcome
Expect that backgrounds are preserved so that functionality for backgrounds can be tested.
#15111 would likely solve the issue.
Matplotlib version
print(matplotlib.get_backend())
): TkAgg (i think?)The text was updated successfully, but these errors were encountered: