Which function in Matplotlib is primarily used to create bar plots?

  • plt.bar()
  • plt.hist()
  • plt.plot()
  • plt.scatter()
In Matplotlib, the plt.bar() function is primarily used to create bar plots. Bar plots are used to represent categorical data with rectangular bars, making it easy to compare different categories.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *