Draw a Histogram using Python Matplotlib December 14, 2018 Draw a Histogram using Python Matplotlib Code : from matplotlib import pyplot as plt import numpy as np a = np.array([22,87,5,43,56,73,55,54,11,20,51,5,79,31,27]) plt.hist(a, bins = [0,20,40,60,80,100]) plt.title("histogram") plt.show() Output : Share Get link Facebook X Pinterest Email Other Apps Labels Python Share Get link Facebook X Pinterest Email Other Apps Comments
Comments
Post a Comment