Hi all!

I'd like to label each of these scatterplots accordingly.

Code:
twoway (scatter studentsat lnincome if department==1, msize(small) mcolor(cranberry%50)  msymbol(circle)) ///
        (scatter studentsat lnincome if department==2, msize(small) mcolor(blue%50) msymbol(circle)) ///
        (scatter studentsat lnincome if department==3, msize(small) mcolor(green%50) msymbol(circle)) ///
        (lfit studentsat lnincome) ///
        (qfit studentsat lnincome)
When I use the "legend" command I receive an error message. ") required r(100)"
This is the command I attached to the code above:

Code:
 legend(label(1 "Economics") label(2 "Socialwork") label(3 "Sociology"))
Any ideas on why I get this error message? Or maybe my whole approach of labelling with this command is erroneous...

Cheers!