Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 105c80a

Browse files
committed
API consistency Fix
1 parent 2175cb0 commit 105c80a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/matplotlib/style/core.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def _apply_style(d, warn=True):
6666
mpl.rcParams.update(_remove_blacklisted_style_params(d, warn=warn))
6767

6868

69-
def use(styles):
69+
def use(style):
7070
"""Use matplotlib style settings from a style specification.
7171
7272
The style name of 'default' is reserved for reverting back to
@@ -90,10 +90,10 @@ def use(styles):
9090
9191
9292
"""
93-
if cbook.is_string_like(styles) or hasattr(styles, 'keys'):
93+
if cbook.is_string_like(style) or hasattr(style, 'keys'):
9494
# If name is a single str or dict, make it a single element list.
95-
styles = [styles]
96-
flattened_style = _flatten_style_dict({PARENT_STYLES: styles})
95+
style = [style]
96+
flattened_style = _flatten_style_dict({PARENT_STYLES: style})
9797
_apply_style(flattened_style)
9898

9999

0 commit comments

Comments
 (0)