From 6608eedfc6f33f723f1e13c6025a5b918c7c9f6d Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Fri, 19 Aug 2022 09:49:56 +0200 Subject: [PATCH] Re-rename builtin seaborn styles to not include a dot. ... as we may want to use dots later to support third-party styles, e.g. `foo.bar` could be used to mean `foo/bar.mplstyle` where `foo` is a regularly installed python package. --- doc/api/next_api_changes/deprecations/22317-AL.rst | 4 ++-- ...eaborn0.8-bright.mplstyle => seaborn-v0_8-bright.mplstyle} | 0 ...8-colorblind.mplstyle => seaborn-v0_8-colorblind.mplstyle} | 0 ...rk-palette.mplstyle => seaborn-v0_8-dark-palette.mplstyle} | 0 .../{seaborn0.8-dark.mplstyle => seaborn-v0_8-dark.mplstyle} | 0 ...rn0.8-darkgrid.mplstyle => seaborn-v0_8-darkgrid.mplstyle} | 0 .../{seaborn0.8-deep.mplstyle => seaborn-v0_8-deep.mplstyle} | 0 ...{seaborn0.8-muted.mplstyle => seaborn-v0_8-muted.mplstyle} | 0 ...rn0.8-notebook.mplstyle => seaborn-v0_8-notebook.mplstyle} | 0 ...{seaborn0.8-paper.mplstyle => seaborn-v0_8-paper.mplstyle} | 0 ...eaborn0.8-pastel.mplstyle => seaborn-v0_8-pastel.mplstyle} | 0 ...eaborn0.8-poster.mplstyle => seaborn-v0_8-poster.mplstyle} | 0 .../{seaborn0.8-talk.mplstyle => seaborn-v0_8-talk.mplstyle} | 0 ...{seaborn0.8-ticks.mplstyle => seaborn-v0_8-ticks.mplstyle} | 0 ...{seaborn0.8-white.mplstyle => seaborn-v0_8-white.mplstyle} | 0 ...0.8-whitegrid.mplstyle => seaborn-v0_8-whitegrid.mplstyle} | 0 .../stylelib/{seaborn0.8.mplstyle => seaborn-v0_8.mplstyle} | 0 lib/matplotlib/style/core.py | 4 ++-- lib/matplotlib/tests/test_style.py | 2 +- tutorials/colors/colors.py | 2 +- 20 files changed, 6 insertions(+), 6 deletions(-) rename lib/matplotlib/mpl-data/stylelib/{seaborn0.8-bright.mplstyle => seaborn-v0_8-bright.mplstyle} (100%) rename lib/matplotlib/mpl-data/stylelib/{seaborn0.8-colorblind.mplstyle => seaborn-v0_8-colorblind.mplstyle} (100%) rename lib/matplotlib/mpl-data/stylelib/{seaborn0.8-dark-palette.mplstyle => seaborn-v0_8-dark-palette.mplstyle} (100%) rename lib/matplotlib/mpl-data/stylelib/{seaborn0.8-dark.mplstyle => seaborn-v0_8-dark.mplstyle} (100%) rename lib/matplotlib/mpl-data/stylelib/{seaborn0.8-darkgrid.mplstyle => seaborn-v0_8-darkgrid.mplstyle} (100%) rename lib/matplotlib/mpl-data/stylelib/{seaborn0.8-deep.mplstyle => seaborn-v0_8-deep.mplstyle} (100%) rename lib/matplotlib/mpl-data/stylelib/{seaborn0.8-muted.mplstyle => seaborn-v0_8-muted.mplstyle} (100%) rename lib/matplotlib/mpl-data/stylelib/{seaborn0.8-notebook.mplstyle => seaborn-v0_8-notebook.mplstyle} (100%) rename lib/matplotlib/mpl-data/stylelib/{seaborn0.8-paper.mplstyle => seaborn-v0_8-paper.mplstyle} (100%) rename lib/matplotlib/mpl-data/stylelib/{seaborn0.8-pastel.mplstyle => seaborn-v0_8-pastel.mplstyle} (100%) rename lib/matplotlib/mpl-data/stylelib/{seaborn0.8-poster.mplstyle => seaborn-v0_8-poster.mplstyle} (100%) rename lib/matplotlib/mpl-data/stylelib/{seaborn0.8-talk.mplstyle => seaborn-v0_8-talk.mplstyle} (100%) rename lib/matplotlib/mpl-data/stylelib/{seaborn0.8-ticks.mplstyle => seaborn-v0_8-ticks.mplstyle} (100%) rename lib/matplotlib/mpl-data/stylelib/{seaborn0.8-white.mplstyle => seaborn-v0_8-white.mplstyle} (100%) rename lib/matplotlib/mpl-data/stylelib/{seaborn0.8-whitegrid.mplstyle => seaborn-v0_8-whitegrid.mplstyle} (100%) rename lib/matplotlib/mpl-data/stylelib/{seaborn0.8.mplstyle => seaborn-v0_8.mplstyle} (100%) diff --git a/doc/api/next_api_changes/deprecations/22317-AL.rst b/doc/api/next_api_changes/deprecations/22317-AL.rst index 34147d534cdd..0b6093a993ce 100644 --- a/doc/api/next_api_changes/deprecations/22317-AL.rst +++ b/doc/api/next_api_changes/deprecations/22317-AL.rst @@ -3,6 +3,6 @@ seaborn styles renamed Matplotlib currently ships many style files inspired from the seaborn library ("seaborn", "seaborn-bright", "seaborn-colorblind", etc.) but they have gone out of sync with the library itself since the release of seaborn -0.9. To prevent confusion, the style files have been renamed "seaborn0.8", -"seaborn0.8-bright", "seaborn0.8-colorblind", etc. Users are encouraged to +0.9. To prevent confusion, the style files have been renamed "seaborn-v0_8", +"seaborn-v0_8-bright", "seaborn-v0_8-colorblind", etc. Users are encouraged to directly use seaborn to access the up-to-date styles. diff --git a/lib/matplotlib/mpl-data/stylelib/seaborn0.8-bright.mplstyle b/lib/matplotlib/mpl-data/stylelib/seaborn-v0_8-bright.mplstyle similarity index 100% rename from lib/matplotlib/mpl-data/stylelib/seaborn0.8-bright.mplstyle rename to lib/matplotlib/mpl-data/stylelib/seaborn-v0_8-bright.mplstyle diff --git a/lib/matplotlib/mpl-data/stylelib/seaborn0.8-colorblind.mplstyle b/lib/matplotlib/mpl-data/stylelib/seaborn-v0_8-colorblind.mplstyle similarity index 100% rename from lib/matplotlib/mpl-data/stylelib/seaborn0.8-colorblind.mplstyle rename to lib/matplotlib/mpl-data/stylelib/seaborn-v0_8-colorblind.mplstyle diff --git a/lib/matplotlib/mpl-data/stylelib/seaborn0.8-dark-palette.mplstyle b/lib/matplotlib/mpl-data/stylelib/seaborn-v0_8-dark-palette.mplstyle similarity index 100% rename from lib/matplotlib/mpl-data/stylelib/seaborn0.8-dark-palette.mplstyle rename to lib/matplotlib/mpl-data/stylelib/seaborn-v0_8-dark-palette.mplstyle diff --git a/lib/matplotlib/mpl-data/stylelib/seaborn0.8-dark.mplstyle b/lib/matplotlib/mpl-data/stylelib/seaborn-v0_8-dark.mplstyle similarity index 100% rename from lib/matplotlib/mpl-data/stylelib/seaborn0.8-dark.mplstyle rename to lib/matplotlib/mpl-data/stylelib/seaborn-v0_8-dark.mplstyle diff --git a/lib/matplotlib/mpl-data/stylelib/seaborn0.8-darkgrid.mplstyle b/lib/matplotlib/mpl-data/stylelib/seaborn-v0_8-darkgrid.mplstyle similarity index 100% rename from lib/matplotlib/mpl-data/stylelib/seaborn0.8-darkgrid.mplstyle rename to lib/matplotlib/mpl-data/stylelib/seaborn-v0_8-darkgrid.mplstyle diff --git a/lib/matplotlib/mpl-data/stylelib/seaborn0.8-deep.mplstyle b/lib/matplotlib/mpl-data/stylelib/seaborn-v0_8-deep.mplstyle similarity index 100% rename from lib/matplotlib/mpl-data/stylelib/seaborn0.8-deep.mplstyle rename to lib/matplotlib/mpl-data/stylelib/seaborn-v0_8-deep.mplstyle diff --git a/lib/matplotlib/mpl-data/stylelib/seaborn0.8-muted.mplstyle b/lib/matplotlib/mpl-data/stylelib/seaborn-v0_8-muted.mplstyle similarity index 100% rename from lib/matplotlib/mpl-data/stylelib/seaborn0.8-muted.mplstyle rename to lib/matplotlib/mpl-data/stylelib/seaborn-v0_8-muted.mplstyle diff --git a/lib/matplotlib/mpl-data/stylelib/seaborn0.8-notebook.mplstyle b/lib/matplotlib/mpl-data/stylelib/seaborn-v0_8-notebook.mplstyle similarity index 100% rename from lib/matplotlib/mpl-data/stylelib/seaborn0.8-notebook.mplstyle rename to lib/matplotlib/mpl-data/stylelib/seaborn-v0_8-notebook.mplstyle diff --git a/lib/matplotlib/mpl-data/stylelib/seaborn0.8-paper.mplstyle b/lib/matplotlib/mpl-data/stylelib/seaborn-v0_8-paper.mplstyle similarity index 100% rename from lib/matplotlib/mpl-data/stylelib/seaborn0.8-paper.mplstyle rename to lib/matplotlib/mpl-data/stylelib/seaborn-v0_8-paper.mplstyle diff --git a/lib/matplotlib/mpl-data/stylelib/seaborn0.8-pastel.mplstyle b/lib/matplotlib/mpl-data/stylelib/seaborn-v0_8-pastel.mplstyle similarity index 100% rename from lib/matplotlib/mpl-data/stylelib/seaborn0.8-pastel.mplstyle rename to lib/matplotlib/mpl-data/stylelib/seaborn-v0_8-pastel.mplstyle diff --git a/lib/matplotlib/mpl-data/stylelib/seaborn0.8-poster.mplstyle b/lib/matplotlib/mpl-data/stylelib/seaborn-v0_8-poster.mplstyle similarity index 100% rename from lib/matplotlib/mpl-data/stylelib/seaborn0.8-poster.mplstyle rename to lib/matplotlib/mpl-data/stylelib/seaborn-v0_8-poster.mplstyle diff --git a/lib/matplotlib/mpl-data/stylelib/seaborn0.8-talk.mplstyle b/lib/matplotlib/mpl-data/stylelib/seaborn-v0_8-talk.mplstyle similarity index 100% rename from lib/matplotlib/mpl-data/stylelib/seaborn0.8-talk.mplstyle rename to lib/matplotlib/mpl-data/stylelib/seaborn-v0_8-talk.mplstyle diff --git a/lib/matplotlib/mpl-data/stylelib/seaborn0.8-ticks.mplstyle b/lib/matplotlib/mpl-data/stylelib/seaborn-v0_8-ticks.mplstyle similarity index 100% rename from lib/matplotlib/mpl-data/stylelib/seaborn0.8-ticks.mplstyle rename to lib/matplotlib/mpl-data/stylelib/seaborn-v0_8-ticks.mplstyle diff --git a/lib/matplotlib/mpl-data/stylelib/seaborn0.8-white.mplstyle b/lib/matplotlib/mpl-data/stylelib/seaborn-v0_8-white.mplstyle similarity index 100% rename from lib/matplotlib/mpl-data/stylelib/seaborn0.8-white.mplstyle rename to lib/matplotlib/mpl-data/stylelib/seaborn-v0_8-white.mplstyle diff --git a/lib/matplotlib/mpl-data/stylelib/seaborn0.8-whitegrid.mplstyle b/lib/matplotlib/mpl-data/stylelib/seaborn-v0_8-whitegrid.mplstyle similarity index 100% rename from lib/matplotlib/mpl-data/stylelib/seaborn0.8-whitegrid.mplstyle rename to lib/matplotlib/mpl-data/stylelib/seaborn-v0_8-whitegrid.mplstyle diff --git a/lib/matplotlib/mpl-data/stylelib/seaborn0.8.mplstyle b/lib/matplotlib/mpl-data/stylelib/seaborn-v0_8.mplstyle similarity index 100% rename from lib/matplotlib/mpl-data/stylelib/seaborn0.8.mplstyle rename to lib/matplotlib/mpl-data/stylelib/seaborn-v0_8.mplstyle diff --git a/lib/matplotlib/style/core.py b/lib/matplotlib/style/core.py index 726ba938cdbc..fb0a5426e61d 100644 --- a/lib/matplotlib/style/core.py +++ b/lib/matplotlib/style/core.py @@ -135,9 +135,9 @@ def fix_style(s): "3.6", message="The seaborn styles shipped by Matplotlib " "are deprecated since %(since)s, as they no longer " "correspond to the styles shipped by seaborn. However, " - "they will remain available as 'seaborn0.8-