Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d5a77cf

Browse filesBrowse files
authored
Merge pull request #11707 from meeseeksmachine/auto-backport-of-pr-11677-on-v2.2.2-doc
Backport PR #11677 on branch v2.2.2-doc
2 parents b78f64f + 3a957bd commit d5a77cf
Copy full SHA for d5a77cf

File tree

Expand file treeCollapse file tree

1 file changed

+11
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+11
-1
lines changed

‎examples/lines_bars_and_markers/stem_plot.py

Copy file name to clipboardExpand all lines: examples/lines_bars_and_markers/stem_plot.py
+11-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.