Incorrect histogram when MIDPOINTS= list subsets the data in PROC UNIVARIATE


PROC UNIVARIATE incorrectly allows you to plot a subset of the input data by using the MIDPOINTS= option on the HISTOGRAM statement. The documentation states that the range of midpoints, extended at each end by half of the bar width, must cover the range of the data. When the midpoint values do not span the range of data in this manner, the resulting histogram is drawn incorrectly.

To avoid this problem, either specify midpoint values to cover the range of data as documented, or omit the MIDPOINTS= option and use the default midpoint values.