plot-historgram function