From 90b43333f44891859f0ce2fbaaf1c0f2d320e6f6 Mon Sep 17 00:00:00 2001 From: Ruth Nainggolan Date: Tue, 21 Dec 2021 21:57:42 -0500 Subject: [PATCH] Update lines_with_ticks_demo.py Add explanatory comments to the example on lines with ticked patheffect --- examples/lines_bars_and_markers/lines_with_ticks_demo.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/lines_bars_and_markers/lines_with_ticks_demo.py b/examples/lines_bars_and_markers/lines_with_ticks_demo.py index c7b902f09ddf..f7ef646c647f 100644 --- a/examples/lines_bars_and_markers/lines_with_ticks_demo.py +++ b/examples/lines_bars_and_markers/lines_with_ticks_demo.py @@ -15,10 +15,12 @@ import matplotlib.pyplot as plt from matplotlib import patheffects +# Plot a straight diagonal line with ticked style path fig, ax = plt.subplots(figsize=(6, 6)) ax.plot([0, 1], [0, 1], label="Line", path_effects=[patheffects.withTickedStroke(spacing=7, angle=135)]) +# Plot a curved line with ticked style path nx = 101 x = np.linspace(0.0, 1.0, nx) y = 0.3*np.sin(x*8) + 0.4