Try 
.twoway (lfit mpg weight, clcolor(red)) (scatter mpg weight, mcolor(blue)),
by(foreign, legend(off)) ytitle(Mileage)
Ichiro Fujikake
[email protected]
On 04.6.28 13:09, "Renzo Comolli" <[email protected]> wrote:
> Dear Statalist, 
> 
> I create graph here below and I don't manage to turn the legend off. Could
> anyone help me, please?
> I tried putting -,legend off- in as many places as I could, but I did not
> succeed.
> 
> My graph is
> . sysuse auto
> . twoway (lfit mpg weight, clcolor(red)) (scatter mpg weight, mcolor(blue)),
> by(foreign) ytitle(Mileage)
> 
> 
> I tried 
> . twoway (lfit mpg  weight, clcolor(red)) (scatter  mpg weight,
> mcolor(blue)), by( foreign) ytitle(Mileage) legend(off)
> . twoway (lfit mpg  weight, clcolor(red) legend(off)) (scatter  mpg weight,
> mcolor(blue) legend(off)), by( foreign) ytitle(Mileage)
> . twoway (lfit mpg  weight, clcolor(red) legend(off)) (scatter  mpg weight,
> mcolor(blue) legend(off)), by( foreign) ytitle(Mileage) legend(off)
> but the legend is still there.
> 
> 
> Thanks
> 
> Best Regards,
> Renzo Comolli
> 
> 
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
> 
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/