Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Legend Option


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: Legend Option
Date   Sun, 30 Oct 2005 21:44:32 -0000

This is clearly indicated in the help. 
For example, use -legend(order(3 4))- to 
show only the 3rd and 4th response variables. 

In your case, this could be combined with 
your existing syntax something like this: 

legend(order(3 "AA" 4 "SS") pos(10) ring(0))	

Nick 
[email protected] 

Raphael Fraser
 
> I have the following graph in Stata 8.2:
> 
> twoway (rcap ub lb ragey if geno==1)|| ///
>             (rcap ub lb ragey if geno==2)|| ///
>             (scatter p ragey if geno==1, msymbol(O) connect(l)
> clp(longdash_dot)) || ///
>             (scatter p ragey if geno==2, msymbol(O) connect(l))||, ///
> 	  ti("Prevalence (%)") xmtick(10(1)25) ymtick(0(5)50) 
> yla(,angle(0))
> xti("Age (in years)") ///
> 	  legend(label(3 "AA") label(4 "SS") pos(10) ring(0))	
> 
> As a result Stata produces four variables in the legend. I wish only
> to keep two of the four variables in the legend. How can this be done?

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index