Skip to content

Commit

Permalink
DOC: Fix label type specification in parameter descriptions
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
timhoffm committed Mar 27, 2024
1 parent f990868 commit 0f0efed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3058,7 +3058,7 @@ def stem(self, *args, linefmt=None, markerfmt=None, basefmt=None, bottom=0,
bottom : float, default: 0
The y/x-position of the baseline (depending on *orientation*).
label : str, default: None
label : str, optional
The label to use for the stems in legends.
data : indexable object, optional
Expand Down Expand Up @@ -6831,7 +6831,7 @@ def hist(self, x, bins=None, range=None, density=False, weights=None,
Color or sequence of colors, one per dataset. Default (``None``)
uses the standard line color sequence.
label : str or None, default: None
label : str or list of str, optional
String, or sequence of strings to match multiple datasets. Bar
charts yield multiple patches per dataset, but only the first gets
the label, so that `~.Axes.legend` will work as expected.
Expand Down
2 changes: 1 addition & 1 deletion lib/mpl_toolkits/mplot3d/axes3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -3610,7 +3610,7 @@ def stem(self, x, y, z, *, linefmt='C0-', markerfmt='C0o', basefmt='C3-',
bottom : float, default: 0
The position of the baseline, in *orientation*-coordinates.
label : str, default: None
label : str, optional
The label to use for the stems in legends.
orientation : {'x', 'y', 'z'}, default: 'z'
Expand Down

0 comments on commit 0f0efed

Please sign in to comment.