How do I change the legend labels for a scatter plot has, for example, one symbol for females and one for males?
You need to use a legend option to do this. For example, suppose that you want to make a scatter plot of y on x based on a third variable gender. You could use the following command: scatter y x if gender==”f”, msymbol(circle) || scatter y x if gender==”m”, msymbol(square) legend(label(1 “Female”) label(2 “Male”)) This is easily generalized to multiple groups, different colors, and so forth. Top of page.