8000 Small doc change + use zip · matplotlib/matplotlib@6b19ba6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6b19ba6

Browse files
committed
Small doc change + use zip
< 8000 /span>
1 parent 0bef714 commit 6b19ba6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2543,7 +2543,8 @@ def stem(self, *args, linefmt=None, markerfmt=None, basefmt=None, bottom=0,
25432543
If ``True``, store and plot the stem lines as a
25442544
`~.collections.LineCollection` instead of individual lines. This
25452545
significantly increases performance, and will become the default
2546-
option in Matplotlib 3.3. If ``False``, defaults to old behaviour.
2546+
option in Matplotlib 3.3. If ``False``, defaults to the old
2547+
behavior of using a list of `.Line2D` objects.
25472548
25482549
25492550
Returns
@@ -2630,8 +2631,7 @@ def stem(self, *args, linefmt=None, markerfmt=None, basefmt=None, bottom=0,
26302631
# New behaviour in 3.1 is to use a LineCollection for the stemlines
26312632
if use_line_collection:
26322633
stemlines = []
2633-
for thisx, thisy in zip(x, y):
2634-
stemlines.append(((thisx, bottom), (thisx, thisy)))
2634+
stemlines = [((xi, bottom), (xi, yi)) for xi, yi in zip(x, y)]
26352635
stemlines = mcoll.LineCollection(stemlines, linestyles=linestyle,
26362636
colors=linecolor,
26372637
label='_nolegend_')

0 commit comments

Comments
 (0)
0