Skip to content

Commit d920e7d

Browse files
committed
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.
1 parent 69cf385 commit d920e7d

20 files changed

+6
-6
lines changed

doc/api/next_api_changes/deprecations/22317-AL.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ seaborn styles renamed
33
Matplotlib currently ships many style files inspired from the seaborn
44
library ("seaborn", "seaborn-bright", "seaborn-colorblind", etc.) but they
55
have gone out of sync with the library itself since the release of seaborn
6-
0.9. To prevent confusion, the style files have been renamed "seaborn0.8",
7-
"seaborn0.8-bright", "seaborn0.8-colorblind", etc. Users are encouraged to
6+
0.9. To prevent confusion, the style files have been renamed "seaborn08",
7+
"seaborn08-bright", "seaborn08-colorblind", etc. Users are encouraged to
88
directly use seaborn to access the up-to-date styles.

lib/matplotlib/style/core.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,9 @@ def fix_style(s):
135135
"3.6", message="The seaborn styles shipped by Matplotlib "
136136
"are deprecated since %(since)s, as they no longer "
137137
"correspond to the styles shipped by seaborn. However, "
138-
"they will remain available as 'seaborn0.8-<style>'. "
138+
"they will remain available as 'seaborn08-<style>'. "
139139
"Alternatively, directly use the seaborn API instead.")
140-
s = s.replace("seaborn", "seaborn0.8")
140+
s = s.replace("seaborn", "seaborn08")
141141
return s
142142

143143
for style in map(fix_style, styles):

lib/matplotlib/tests/test_style.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def test_xkcd_cm():
178178

179179

180180
def test_deprecated_seaborn_styles():
181-
with mpl.style.context("seaborn0.8-bright"):
181+
with mpl.style.context("seaborn08-bright"):
182182
seaborn_bright = mpl.rcParams.copy()
183183
assert mpl.rcParams != seaborn_bright
184184
with pytest.warns(mpl._api.MatplotlibDeprecationWarning):

tutorials/colors/colors.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def demo(sty):
134134

135135

136136
demo('default')
137-
demo('seaborn0.8')
137+
demo('seaborn08')
138138

139139
###############################################################################
140140
# The first color ``'C0'`` is the title. Each plot uses the second and third

0 commit comments

Comments
 (0)