Skip to content

Commit 0f0efed

Browse files
committed
DOC: Fix label type specification in parameter descriptions
- add missing "or list of str" in hist() docstring - Use "optional" instead of "default: None" See https://matplotlib.org/devdocs/devel/document.html > If None is only used as a sentinel value for "parameter not specified", > do not document it as the default. Depending on the context, give the > actual default, or mark the parameter as optional if not specifying has > no particular effect.
1 parent f990868 commit 0f0efed

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3058,7 +3058,7 @@ def stem(self, *args, linefmt=None, markerfmt=None, basefmt=None, bottom=0,
30583058
bottom : float, default: 0
30593059
The y/x-position of the baseline (depending on *orientation*).
30603060
3061-
label : str, default: None
3061+
label : str, optional
30623062
The label to use for the stems in legends.
30633063
30643064
data : indexable object, optional
@@ -6831,7 +6831,7 @@ def hist(self, x, bins=None, range=None, density=False, weights=None,
68316831
Color or sequence of colors, one per dataset. Default (``None``)
68326832
uses the standard line color sequence.
68336833
6834-
label : str or None, default: None
6834+
label : str or list of str, optional
68356835
String, or sequence of strings to match multiple datasets. Bar
68366836
charts yield multiple patches per dataset, but only the first gets
68376837
the label, so that `~.Axes.legend` will work as expected.

lib/mpl_toolkits/mplot3d/axes3d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3610,7 +3610,7 @@ def stem(self, x, y, z, *, linefmt='C0-', markerfmt='C0o', basefmt='C3-',
36103610
bottom : float, default: 0
36113611
The position of the baseline, in *orientation*-coordinates.
36123612
3613-
label : str, default: None
3613+
label : str, optional
36143614
The label to use for the stems in legends.
36153615
36163616
orientation : {'x', 'y', 'z'}, default: 'z'

0 commit comments

Comments
 (0)