Created plotting code for histograms