Which function is used to draw bar graphs?

27. Which function is used to draw bar graphs?

  1. bar()
  2. bars()
  3. barchat()
  4. barplot()

Answer: A) bar()

Explanation:

To draw a bar graph, you can use the bar() function. Consider the below code statement to draw a bar graph –

name = ["Alvin", "Alex"]
age = [21, 23]
plt.bar(name, age)

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.