Legend guide — Matplotlib 3.8.4 documentation
https://matplotlib.org/stable/users/explain/axes/legend_guide.html
Webfig, ax = plt. subplots line1, = ax. plot ([1, 2, 3], label = "Line 1", linestyle = '--') line2, = ax. plot ([3, 2, 1], label = "Line 2", linewidth = 4) # Create a legend for the first line. first_legend = ax. legend (handles = [line1], loc = 'upper right') # Add the legend manually to the Axes. ax. add_artist (first_legend) # Create another ...
DA: 48 PA: 14 MOZ Rank: 93