1. Home
  2. Data Science
  3. Matplotlib
  4. Which Matplotlib function creates a histogram?

Added 16 Sep 2025

Which Matplotlib function creates a histogram?

  1. plt.bar()
  2. plt.hist() Correct answer
  3. plt.plot()
  4. plt.dist()

Correct answer

B. plt.hist()

17 views

MCQSEXAM

Explanation

plt.hist() is used to create histograms that show the distribution of numerical data.

Reference

Asked in: Data Science Exams

https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.hist.html

Preparing for an exam?

Doubts & discussion

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