Plot statements included in the graph definition can contribute to the legend(s). This can happen automatically, or can be customized using the KEYLEGEND statement. For plot statements that are classified by a group variable, all of the unique group values are displayed in the legend, along with their graphical representation