Backport PR #21126 on branch v3.5.x (Deprecate passing formatting parameters positionally to stem()) by meeseeksmachine · Pull Request #21169 · matplotlib/matplotlib · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions doc/api/next_api_changes/deprecations/21126-TH.rst
6 changes: 6 additions & 0 deletions lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2849,6 +2849,12 @@ def stem(self, *args, linefmt=None, markerfmt=None, basefmt=None, bottom=0,
args = ()
else:
locs, heads, *args = args
if args:
_api.warn_deprecated(
"3.5",
message="Passing the linefmt parameter positionally is "
"deprecated since Matplotlib %(since)s; the "
"parameter will become keyword-only %(removal)s.")

if orientation == 'vertical':
locs, heads = self._process_unit_info([("x", locs), ("y", heads)])
Expand Down
6 changes: 3 additions & 3 deletions lib/matplotlib/tests/test_axes.py