Hello,
I have the following code:

Code:
    preserve
    separate income, by(gender)
    collapse(median) income1 income2 income3 [weight=weight], by(year education)
    graph twoway line income1 income2 income3 year, by(education) yla(, ang(h)) ytitle("Income (in USD)") title("Income by Gender")
    restore
It works well, except the variable names "income1, income2, income3" appear in the legend. I don't want to use the variable labels either (e.g. "income, gender == other"). It seems like without the preserve command, I could have just manually renamed the variables that "separate" generates. However, I'd want the label to be "woman, men, other" rather than "income of women" etc., but this would only make sense for the graph and not the rest of the data. So what's the easiest way for me to change the legend labels?

In case it matters, I'd like to run the same code again with graphs by gender rather than education as well.

Also, how do I change the title so that it titles all 3 graphs generated once, rather than all 3 individually?

I hope this makes sense! Thank you in advance