1. Home
  2. Data Science
  3. Matplotlib
  4. What is the output of plt.hist([1, 1, 2, 3, 3, 3, 4, 4…

Added 24 Feb 2024

What is the output of plt.hist([1, 1, 2, 3, 3, 3, 4, 4, 5], bins=3)?

  1. A histogram with 3 bins Correct answer
  2. A scatter plot
  3. An error
  4. A bar plot

Correct answer

A. A histogram with 3 bins

11 views

MCQSEXAM

Explanation

It produces a histogram with 3 bins. The range 1 to 5 is divided into three equal intervals and the bars show how many of the nine values fall in each.

The call also returns the counts, the bin edges and the drawn patches.

Want more practice? Try the full set of Data Science MCQs on MCQsExam.com.

Doubts & discussion

Not sure why the answer is A? 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