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

Skip to content

Commit d3331ca

Browse files
committed
ENH: change 'label_namer' default to None
None seems the be used much more often than 'y'
1 parent c78bb92 commit d3331ca

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/matplotlib/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1534,7 +1534,7 @@ def _replacer(data, key):
15341534
return key
15351535

15361536

1537-
def unpack_labeled_data(replace_names=None, replace_all_args=False, label_namer="y",
1537+
def unpack_labeled_data(replace_names=None, replace_all_args=False, label_namer=None,
15381538
positional_parameter_names=None):
15391539
"""
15401540
A decorator to add a 'data' kwarg to any a function. The signature
@@ -1552,10 +1552,9 @@ def foo(ax, *args, **kwargs)
15521552
replace_all_args : bool, default: False
15531553
If True, all arguments in *args get replaced, even if they are not in replace_names.
15541554
NOTE: this should be used only when the order of the names depends on the number of *args.
1555-
label_namer : string, optional, default: 'y'
1555+
label_namer : string, optional, default: None
15561556
The name of the parameter which argument should be used as label, if label is not set. If
15571557
None, the label keyword argument is not set.
1558-
NOTE: you MUST pass ``label_namer=None`` if the function can't handle a ``label`` kwarg!
15591558
positional_parameter_names : list of strings, optional, default: None
15601559
The full list of positional parameter names (excluding an explicit `ax`/'self' argument at
15611560
the first place and including all possible positional parameter in `*args`), in the right

0 commit comments

Comments
 (0)