Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: A -legend- question about graph


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: A -legend- question about graph
Date   Mon, 20 Nov 2006 14:56:59 -0000

I did this with an up-to-date Stata 9.2 

sysuse auto, clear 
separate mpg, by(foreign) 

graph twoway qfit mpg0 weight, lpattern("_-_#")|| ///
qfit mpg1 weight, lpattern("l") ||,  ///
legend(label(1 "Domestic") label(2 "Foreign") row(1) )

and I get no problems. I get "Fitted values" on the
y axis. 

As possibly no one else can test your exact example, 
without creating an artificial dataset, 
please phrase any replies in terms of the example above. 

Nick 
n.j.cox@durham.ac.uk 

Jia Xiangping
 
> I am graphing an override chart. But the legends do not change, though
> I define the legend label. Both legends are displayed as "Fitted
> values", instead of the words customized by myself.
> 
> graph twoway qfit formhat aginc_rt, lpattern("_-_#")|| ///
> qfit ivfmhat aginc_rt, lpattern("l") ||,  ///
> legend(label(1 "Model1") label(2 "Model2") row(1) )
> 
> Can anybody give me some tips. Thanks.

*
*   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/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index