1. Home
  2. Data Science
  3. Matplotlib
  4. What is the purpose of the plt.stackplot() function in…

Added 24 Feb 2024

What is the purpose of the plt.stackplot() function in Matplotlib?

  1. To create a stacked bar plot
  2. To create a stacked line plot
  3. To create a stacked area plot Correct answer
  4. To create a pie chart

Correct answer

C. To create a stacked area plot

17 views

MCQSEXAM

Explanation

plt.stackplot() creates a stacked area plot: several series are drawn on top of one another so the total height shows the combined value.

It suits data showing how parts contribute to a whole over time.

Want more practice? Try the full set of 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