Cleaned R scripts for histograms