Creating histograms with the Swift language