Define legend characteristics. The LEGEND statement controls the location and appearance of the legend. The POSITION= option specifies the position of the legend relative to the plot; RIGHT specifies the horizontal position; MIDDLE specifies the vertical position. The LABEL= option modifies the legend label; POSITION=TOP places the legend label relative to the legend entries; the ACROSS= option defines the number of columns in the legend.
legend1 position=(right middle) label=(position=top) across=1;