Here is the explanation for each of the eleven plots:
- Plot1: Label is specified as part of the line plot itself.
- Plot2: Label is specified as a method on the line axes, after the line object is created.
- Plot3: Labels are defined as a list on the plt.legend() command itself.
- Plot4: Handles (axes objects) and labels are passed on as tuples to the plt.legend() function.
- Plot5: Only two out of three handles are passed on to plt.legend(), so line_3 is not shown in the legend.
- Plot6: Similar to plot five, but both handles and labels are passed on to the plt.legend().
- Plot7: A patch is used as a label. mpatches.Patch() creates a red patch.
- Plot8: Plots two different categories of data and labels them separately.
- Plot9: Plots the ...