Statalist


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

Re: st: Suppress a legend in overlaid twoway graphs


From   "Elizabeth Allred" <[email protected]>
To   <[email protected]>
Subject   Re: st: Suppress a legend in overlaid twoway graphs
Date   Tue, 22 Jul 2008 16:09:03 -0400

Thanks Scott, that is the solution. 

This is the command I used.

twoway (lfit y x if disease==1, clwidth(thick)) (lfit y x if disease==0, clwidth(thick)) (scatter y x, msize(small)), legend(cols(1) order(1 "Disease" 2 "No disease")) legend(position(11) ring(0))

Liz


>>> On 7/22/2008 at 3:43 PM, in message
<[email protected]>, "Scott Merryman"
<[email protected]> wrote:
> - legend(order(1 "Diseased"  2 "Non-diseased")) -
> 
> Scott
> 
> On Tue, Jul 22, 2008 at 2:34 PM, Elizabeth Allred
> <[email protected]> wrote:
>> Hi Stata folk,
>>
>> I want to overlay 3 graphs. The first two are fitted lines for the diseased 
> and non-diseased and the third is the actual data points.
>>
>> Something like:
>> twoway (lfit y x if disease==1) (lfit y x if disease==0) (scatter y x)
>>
>> Normally, a key (plot symbol & label) for each of the three graphs shows up 
> in the legend but I'd like to suppress the key for the third graph, the 
> scatter plot. How??
>>
>> Liz
>>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search 
> *   http://www.stata.com/support/statalist/faq 
> *   http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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