Create a legend using NOTE statements. The first NOTE statement clears any existing notes. The second NOTE statement identifies the color key used for the different iris species.
   note;
   note j=r 'Species:   ' c=green 'Virginica       '
        j=r c=red 'Versicolor      '
        j=r c=blue 'Setosa         ';
run;