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
{{ message }}
Repository navigation
[TST]: Add classic style to all old image tests. #24716
As a first step to making the new style the testing default, we should go through and change all the old image comparison tests to explicitly use the classic style:
Would it be worth not having a default style, but instead make the style keyword mandatory? That would save someone from going through this loop again if we ever start using something newer than “mpl20”.
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!
IMHO new tests should be written with the default style at that time. It doesn't make a large difference whether we mandate an explicit style setting or whether we set the default to the current one and before switching to a new style, we set explicit values to all then-defaults. Tooling will make both relatively simple.
What we should change: Currently 'classic' is the default style, which is bad. If somebody forgets to set the style, they'll add 'classic' reference images. So things to do here:
add 'classic' to all old image tests as suggested (this PR)
either switch the default to mpl20, or make it mandatory.
Activity
timhoffm commentedon Dec 13, 2022
Already addressed in #24709.
jklymak commentedon Dec 13, 2022
Ooops, didn't see that, though I wonder if @oscargus would add the further detail here to his issue.
oscargus commentedon Dec 13, 2022
There are quite a lot of tests to modify, so I guess that it makes sense to have an issue until all are done and we can change the default style.
rcomer commentedon Dec 13, 2022
Would it be worth not having a default style, but instead make the
stylekeyword mandatory? That would save someone from going through this loop again if we ever start using something newer than “mpl20”.jklymak commentedon Dec 13, 2022
@rcomer that seems like a reasonable plan to me.
github-actions commentedon Feb 9, 2026
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!
timhoffm commentedon Feb 9, 2026
IMHO new tests should be written with the default style at that time. It doesn't make a large difference whether we mandate an explicit style setting or whether we set the default to the current one and before switching to a new style, we set explicit values to all then-defaults. Tooling will make both relatively simple.
What we should change: Currently 'classic' is the default style, which is bad. If somebody forgets to set the style, they'll add 'classic' reference images. So things to do here:
1 remaining item
WeatherGod commentedon Feb 13, 2026
Is it possible to have a linter check if new image comparison tests adds the style keyword?
QuLogic commentedon Feb 13, 2026
No need, we just make it keyword-only without a default value, along with #31148.
TST: Use explicit style in all image_comparison calls
TST: Use explicit style in all image_comparison calls
TST: Use explicit style in all image_comparison calls
TST: Use explicit style in all image_comparison calls
TST: Use explicit style in all image_comparison calls
TST: Use explicit style in all image_comparison calls
TST: Use explicit style in all image_comparison calls
TST: Use explicit style in all image_comparison calls
TST: Use explicit style in all image_comparison calls