
an OFFSETMIN= value for the Y axis. (If the legend’s position was at the top of the
plot, an OFFSETMAX= value would be specified instead.)
ods graphics / reset width=4in;
title "Mileage by Type (Excluding Hybrids)";
proc sgplot data=sashelp.cars;
where type ne "Hybrid";
vbar type / response=mpg_city;
keylegend / location=inside position=bottom;
xaxis grid;
yaxis offsetmin=0.15 display=(nolabel);
run;
title;
Note: For HBOX, HBAR, HLINE, and DOT plot statements, the Y axis is reversed by
default, so the axis origin is at the top. As a result, you use OFFSETMAX= to create
an offset at the bottom of the axis. OFFSETMIN= is used to create an offset at ...