From dcbab5b904b72df332c9578da08d6018cbfef4d0 Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Tue, 15 Nov 2022 14:54:37 +0100 Subject: [PATCH] Backport PR #24459: removed unused variable and fixed text in doc --- examples/text_labels_and_annotations/legend_demo.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/text_labels_and_annotations/legend_demo.py b/examples/text_labels_and_annotations/legend_demo.py index 74bdd245df80..8a8ec28db3a8 100644 --- a/examples/text_labels_and_annotations/legend_demo.py +++ b/examples/text_labels_and_annotations/legend_demo.py @@ -116,7 +116,7 @@ plt.show() ############################################################################### -# Finally, it is also possible to write custom objects that define +# Finally, it is also possible to write custom classes that define # how to stylize legends. @@ -166,7 +166,6 @@ def create_artists(self, legend, orig_handle, fig, ax = plt.subplots() colors = plt.rcParams['axes.prop_cycle'].by_key()['color'][:5] styles = ['solid', 'dashed', 'dashed', 'dashed', 'solid'] -lines = [] for i, color, style in zip(range(5), colors, styles): ax.plot(x, np.sin(x) - .1 * i, c=color, ls=style)