8000 Update lines_with_ticks_demo.py · matplotlib/matplotlib@90b4333 · GitHub
[go: up one dir, main page]

Skip to content

Commit 90b4333

Browse files
author
Ruth Nainggolan
committed
Update lines_with_ticks_demo.py
Add explanatory comments to the example on lines with ticked patheffect
1 parent b57506e commit 90b4333

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

examples/lines_bars_and_markers/lines_with_ticks_demo.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@
1515
import matplotlib.pyplot as plt
1616
from matplotlib import patheffects
1717

18+
# Plot a straight diagonal line with ticked style path
1819
fig, ax = plt.subplots(figsize=(6, 6))
1920
ax.plot([0, 1], [0, 1], label="Line",
2021
path_effects=[patheffects.withTickedStroke(spacing=7, angle=135)])
2122

23+
# Plot a curved line with ticked style path
2224
nx = 101
2325
x = np.linspace(0.0, 1.0, nx)
2426
y = 0.3*np.sin(x*8) + 0.4

0 commit comments

Comments
 (0)
0