8000 tidy gallery example · matplotlib/matplotlib@571837d · GitHub
[go: up one dir, main page]

Skip to content

Commit 571837d

Browse files
committed
tidy gallery example
1 parent 72f80a1 commit 571837d

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

examples/pyplots/pyplot_striped_line.py

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
Pyplot striped line
44
====================
55
6-
Plot a striped line plots in a single call to `~matplotlib.pyplot.plot`, and a correct legend from `~matplotlib.pyplot.legend`.
6+
Plot a striped line in a single call to `~matplotlib.pyplot.plot`, and add a
7+
legend from `~matplotlib.pyplot.legend`.
78
89
"""
910

@@ -13,22 +14,18 @@
1314
x = np.linspace(1., 3., 10)
1415
y = x**3
1516

16-
plt.plot(x, y, linestyle = '--', color = 'orange', offcolor = 'blue', label = 'a stripped line')
17+
plt.plot(x, y, linestyle='--', color='orange', offcolor='blue', linewidth=3,
18+
label='a striped line')
1719
plt.legend()
1820
plt.show()
1921

2022
#############################################################################
2123
#
22-
# ------------
24+
# .. admonition:: References
2325
#
24-
# References
25-
# """"""""""
26+
# The use of the following functions, methods, classes and modules is shown
27+
# in this example:
2628
#
27-
# The use of the following functions, methods, classes and modules is shown
28-
# in this example:
29-
30-
import matplotlib
31-
matplotlib.pyplot.plot
32-
matplotlib.pyplot.show
33-
matplotlib.pyplot.legend
34-
29+
# - `matplotlib.pyplot.plot`
30+
# - `matplotlib.pyplot.legend`
31+
# - `matplotlib.pyplot.show`

lib/matplotlib/tests/test_lines.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ def test_set_line_coll_dash():
8585
@image_comparison(['line_dashes'], remove_text=True)
8686
def test_line_dashes():
8787
fig, ax = plt.subplots()
88+
8889
ax.plot(range(10), linestyle=(0, (3, 3)), lw=5)
8990

9091

0 commit comments

Comments
 (0)
0