Hello everybody,

I have a twoway graph overlaying two scatterplots and one fitted line. I want to suppress the legend for the fitted line but keep it for the two scatterplots.

My code looks like this:

Code:
sysuse auto, clear
separate price, by(foreign)
tw (scatter price1 mpg) (scatter price0 mpg) (lfit price mpg)
So I want to keep the colour legend for the dots (corresponding to the 2 outcomes of the variable foreign) but without the legend for the fitted line.

The most natural approach to me was to use legend(off) within the lfit parentheses like below, but it deletes the whole legend.
Code:
tw (scatter price1 mpg) (scatter price0 mpg) (lfit price mpg, legend(off))
Thank you for your help,
Antonin