major cleanup in distribution ploting functions.
major cleanup in distribution ploting functions.