Added save histogram function that uses matplotlib.