added function to plot histogram of labels