bar chart using matplotlib in python code example
Example 1: how to plotting bar on matplotlib
import matplotlib.pyplot as plt
data = [5., 25., 50., 20.]
plt.bar(range(len(data)),data)
plt.show()
// to set the thickness of a bar, we can set 'width'
// plt.bar(range(len(data)), data, width = 1.)
Example 2: bar plot python
import matplotlib.pyplot as plt
import numpy as np
plt.bar(np.arange(0,100),np.arange(0,100))