from matplotlib import pyplot as plt import numpy as np # Creating dataset a = np.array([22, 87, 5, 43, 56, 73, 55, 54, 11, 20, 51, 5, 79, 31, 27]) # Creating histogram fig, ax = plt.subplots(figsize =(10, 7)) ax.hist(a, bins = [0, 25, 50, 75, 100]) # Show plot plt.show()
import pyplot from matplotlib as plt plt.hist(x_axis_list, y_axis_list)