Define legend characteristics. POSITION= centers the legend to the right of the graphics area, and LABEL= positions the legend label above the legend entries. ACROSS= places legend entries in rows 1 entry wide.
legend1 position=(right middle)
        label=(position=top)
        across=1;