CBSE Class 12 Informatics Practices Question 63 of 147

Plotting with Pyplot — Question 28

Back to all questions
28
Question

Question 28

Which argument in hist() is used to create a stacked bar type histogram ?

  1. histt
  2. histtype
  3. type
  4. barstacked
Answer

histtype

Reason — The histtype argument in Matplotlib's hist() function is used to create a stacked bar type histogram. Setting histtype = 'barstacked' creates a histogram where bars for each bin are stacked on top of each other, representing different categories or subgroups within the data.