Skip to content

Don't set savefig.facecolor/edgecolor in dark_background/538 styles. #28156

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

Merged
merged 1 commit into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions doc/api/next_api_changes/behavior/28156-AL.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
dark_background and fivethirtyeight styles no longer set ``savefig.facecolor`` and ``savefig.edgecolor``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

When using these styles, :rc:`savefig.facecolor` and :rc:`savefig.edgecolor`
now inherit the global default value of "auto", which means that the actual
figure colors will be used. Previously, these rcParams were set to the same
values as :rc:`figure.facecolor` and :rc:`figure.edgecolor`, i.e. a saved
figure would always use the theme colors even if the user manually overrode
them; this is no longer the case.

This change should have no impact for users that do not manually set the figure
face and edge colors.
3 changes: 0 additions & 3 deletions lib/matplotlib/mpl-data/stylelib/dark_background.mplstyle
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ grid.color: white
figure.facecolor: black
figure.edgecolor: black

savefig.facecolor: black
savefig.edgecolor: black

### Boxplots
boxplot.boxprops.color: white
boxplot.capprops.color: white
Expand Down
5 changes: 1 addition & 4 deletions lib/matplotlib/mpl-data/stylelib/fivethirtyeight.mplstyle
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,7 @@ xtick.minor.size: 0
ytick.major.size: 0
ytick.minor.size: 0

font.size:14.0

savefig.edgecolor: f0f0f0
savefig.facecolor: f0f0f0
font.size: 14.0

figure.subplot.left: 0.08
figure.subplot.right: 0.95
Expand Down
Loading