Produce the first horizontal bar chart. Because neither the MIDPOINTS= option nor the DISCRETE option is used, the procedure automatically selects the midpoints. The SUBGROUP= option divides the bars according to the values of SEX and automatically generates a legend. The AUTOREF option adds reference lines to the chart at each major tick mark. The CLIPREF option positions the reference lines behind the bars.


proc gchart data=fitness;
hbar age / subgroup=sex legend=legend1 autoref
     clipref
     raxis=axis1;
run;