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

Skip to content

Commit d8a90ae

Browse files
authored
Merge pull request #22034 from ruthgn/explain_ticked_patheffect_example
Update lines_with_ticks_demo.py
2 parents a8edff6 + 90b4333 commit d8a90ae

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)