Histogram and Barplot with Python
Introduction Some people make a small confusion with histogram and barplots. So in this post we intend to provide some points about both of them. Let’s supose that we have a sample from 200 persons, and we need to check the age distribution, so we can produce a histogram (Figure 1). # creating data DF = pd.DataFrame({"A" : np.random.normal(30, 0.75, 200)}) # plot plt.figure(figsize=(8, 5)) plt.hist(DF["A"], bins = 10, color='steelblue', alpha = 0.