1. Home
  2. Data Science
  3. Matplotlib
  4. Which of the following statements about Matplotlib legends…

Added 24 Feb 2024

Which of the following statements about Matplotlib legends is true?

  1. Legends are automatically generated for all plots
  2. Legends are not supported in Matplotlib
  3. Legends can be customized using the plt.legend() function Correct answer
  4. Legends are only available for scatter plots

Correct answer

C. Legends can be customized using the plt.legend() function

17 views

MCQSEXAM

Explanation

Legends can be customised with plt.legend() — its location, font size, title, number of columns and frame can all be set.

A legend is not added automatically; you must call legend() and give your plotted series labels.

Keep preparing with more Data Science MCQs on MCQsExam.com.

Doubts & discussion

Not sure why the answer is C? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Matplotlib MCQs

Practise all Matplotlib MCQs

Similar MCQs