Python 3 Matplotlib Library Script to Plot a Bar Graph From Points DataFrame

Python 3 Matplotlib Library Script to Plot a Bar Graph From Points DataFrame

Python 3 Matplotlib Library Script to Plot a Bar Graph From Points DataFrame

from matplotlib import pyplot as plt 
  
# x-axis values 
x = [5, 2, 9, 4, 7] 
  
# Y-axis values 
y = [10, 5, 8, 4, 2] 
  
# Function to plot the bar 
plt.bar(x,y) 
  
# function to show the plot 
plt.show()
Share on:

Hi, I'm Ranjith a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coding Diksha. Here, I post about programming to help developers.

Leave a Comment