Matplotlib - Seaborn Integration
Which of the following is the correct syntax to add a legend with labels in matplotlib?
plt.legend() function accepts a list of labels as its first argument to display in the legend.plt.legend(['Data1', 'Data2']) correctly passes a list of labels. The other options use incorrect parameter names or argument formats.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions