Reputation: 115
I have to plot two values as a histogram using python.
File=[1,2,3]
File1=[3,4,5,6]
files=len(File)
files1=len(File1)
I want to plot the length of the files. files
and files1
should be on the x-axis and the y-axis needs to have the count like 0, 10, 20 ....
Upvotes: 1
Views: 3400
Reputation: 23647
I guess you want a bar plot like this:
import matplotlib.pyplot as plt
plt.bar([0, 1], [files, files1])
plt.show()
Check out the matplotlib examples if you want to find out how to format and change labels, axis limits, etc.
Upvotes: 1