diff --git a/doc/releases/v0.12.0.txt b/doc/releases/v0.12.0.txt index bbeba0df41..3550ce5d85 100644 --- a/doc/releases/v0.12.0.txt +++ b/doc/releases/v0.12.0.txt @@ -94,6 +94,8 @@ Other updates - |Fix| Improved robustness to numerical errors in :func:`kdeplot` (:pr:`2862`). +- |Defaults| The `patch.facecolor` rc param is no longer set by :func:`set_palette` (or :func:`set_theme`). This should have no effect, because the matplotlib default is now `"C0"` (:pr:`2906`). + - |Dependencies| Made `scipy` an optional dependency and added `pip install seaborn[all]` as a method for ensuring the availability of compatible `scipy` and `statsmodels` libraries at install time. This has a few minor implications for existing code, which are explained in the Github pull request (:pr:`2398`). - |Dependencies| Following `NEP29 `_, dropped support for Python 3.6 and bumped the minimally-supported versions of the library dependencies. diff --git a/seaborn/rcmod.py b/seaborn/rcmod.py index 4ec7f17fed..4568ebc540 100644 --- a/seaborn/rcmod.py +++ b/seaborn/rcmod.py @@ -508,8 +508,7 @@ def set_palette(palette, n_colors=None, desat=None, color_codes=False): Parameters ---------- palette : seaborn color paltte | matplotlib colormap | hls | husl - Palette definition. Should be something that :func:`color_palette` - can process. + Palette definition. Should be something :func:`color_palette` can process. n_colors : int Number of colors in the cycle. The default number of colors will depend on the format of ``palette``, see the :func:`color_palette` @@ -537,7 +536,6 @@ def set_palette(palette, n_colors=None, desat=None, color_codes=False): colors = palettes.color_palette(palette, n_colors, desat) cyl = cycler('color', colors) mpl.rcParams['axes.prop_cycle'] = cyl - mpl.rcParams["patch.facecolor"] = colors[0] if color_codes: try: palettes.set_color_codes(palette) diff --git a/tests/test_rcmod.py b/tests/test_rcmod.py index 11cbd837fc..cc5e39f17d 100644 --- a/tests/test_rcmod.py +++ b/tests/test_rcmod.py @@ -260,6 +260,10 @@ def test_set_palette(self): rcmod.set_palette("Set2", color_codes=True) assert utils.get_color_cycle() == palettes.color_palette("Set2", 8) + assert mpl.colors.same_color( + mpl.rcParams["patch.facecolor"], palettes.color_palette()[0] + ) + class TestFonts: