Skip to content

Commit e68a2bf

Browse files
committed
Make stem formatting parameters keyword only.
This will allow to simplify the implementation because, currently, `stem(*args, linefmt=None, ...)` still tries to resolve excess positionally passed args, to *linefmt* and following parameters, which is quite a bit of logic. OTOH, since we have 3 formats, passing them positionally is already difficult from a usability/readability perspective, because they can easily be mixed up.
1 parent c53216b commit e68a2bf

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Passing formatting parameters positionally to ``stem()`` is deprecated
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

lib/matplotlib/axes/_axes.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2773,6 +2773,7 @@ def broken_barh(self, xranges, yrange, **kwargs):
27732773

27742774
return col
27752775

2776+
@_api.make_keyword_only("3.5", 'linefmt')
27762777
@_preprocess_data()
27772778
def stem(self, *args, linefmt=None, markerfmt=None, basefmt=None, bottom=0,
27782779
label=None, use_line_collection=True, orientation='vertical'):

0 commit comments

Comments
 (0)