how to plot histogram in matplotlib

How to Plot Histogram in Matplotlib 0

How to Plot Histogram in Matplotlib

Program 1 import matplotlib.pyplot as mat prod_price=[0,10,25,30,70,100,150,400,350,500,700] prod_range=[0,30,100,150,300,500,800] mat.hist(prod_price,prod_range,rwidth=0.3,histtype=”bar”,facecolor=’r’) mat.xticks([0,30,50,100,300,500,800]) mat.title(“Product Price Range”) mat.xlabel(“Product Price”) mat.ylabel(“Product Range”) mat.show()