What is the purpose of the legend() function in Matplotlib?

PYQ EMRS TGT/PGT (ESSE) 2023

What is the purpose of the legend() function in Matplotlib?

  1. A.

    To add a title to a plot

  2. B.

    To add annotations to a plot

  3. C.

    To label different lines or markers on a plot

  4. D.

    To label the x and y axes of a plot

Attempted by 1855 students.

Sign up free to check your answer

Sign up free

Explore the full course: Emrs Cs Tier 2

Loading lesson…