diff --git a/tutorials/intermediate/legend_guide.py b/tutorials/intermediate/legend_guide.py index 1182ac2d392b..c62a59d9c440 100644 --- a/tutorials/intermediate/legend_guide.py +++ b/tutorials/intermediate/legend_guide.py @@ -151,7 +151,7 @@ first_legend = plt.legend(handles=[line1], loc='upper right') # Add the legend manually to the current Axes. -ax = plt.gca().add_artist(first_legend) +plt.gca().add_artist(first_legend) # Create another legend for the second line. plt.legend(handles=[line2], loc='lower right')