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

Skip to content

Commit 8bf4e02

Browse files
committed
Fix stem(use_line_collection)
1 parent 9faf231 commit 8bf4e02

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2779,8 +2779,9 @@ def stem(self, *args, linefmt=None, markerfmt=None, basefmt=None, bottom=0,
27792779

27802780
# New behaviour in 3.1 is to use a LineCollection for the stemlines
27812781
if use_line_collection:
2782-
stemlines = []
27832782
stemlines = [((xi, bottom), (xi, yi)) for xi, yi in zip(x, y)]
2783+
if linestyle is None:
2784+
linestyle = 'solid'
27842785
stemlines = mcoll.LineCollection(stemlines, linestyles=linestyle,
27852786
colors=linecolor,
27862787
label='_nolegend_')

0 commit comments

Comments
 (0)