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

Skip to content

Commit 3a957bd

Browse files
jklymakMeeseeksDev[bot]
authored and
MeeseeksDev[bot]
committed
Backport PR #11677: DOC : Improves Documentation for stem_plot.py
1 parent b78f64f commit 3a957bd

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

examples/lines_bars_and_markers/stem_plot.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,23 @@
33
Stem Plot
44
=========
55
6-
Example stem plot.
6+
Stem plot plots vertical lines from baseline to the y-coordinate
7+
Plotting cosine(x) w.r.t x, using '-.' as the pattern
8+
for plotting vertical lines
79
"""
810
import matplotlib.pyplot as plt
911
import numpy as np
1012

13+
# returns 10 evenly spaced samples from 0.1 to 2*PI
1114
x = np.linspace(0.1, 2 * np.pi, 10)
15+
1216
markerline, stemlines, baseline = plt.stem(x, np.cos(x), '-.')
17+
18+
# setting property of baseline with color red and linewidth 2
1319
plt.setp(baseline, color='r', linewidth=2)
1420

1521
plt.show()
22+
23+
#############################
24+
# This example makes use of:
25+
# * :meth:`matplotlib.axes.Axes.stem`

0 commit comments

Comments
 (0)