Histogram to the csv file, plotting histogram