Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: how to draw several kdensity curves in one graph
From
Christopher Hajzler <[email protected]>
To
[email protected]
Subject
Re: st: how to draw several kdensity curves in one graph
Date
Wed, 3 Mar 2010 10:49:30 +1300
Hi Guang,
Coincidentally, I was just wrestling with the same thing myself
yesterday. Here is the command I used:
kdensity var if (year==1999), plot(kdensity var if
(year==1989)||kdensity var if (year==1979)) legend(ring(0) pos(2)
label(1 "1999") label(2 "1989") label(3 "1979") )
Hope this helps!
Chris
On Wed, Mar 3, 2010 at 10:48 AM, Christopher Hajzler <[email protected]> wrote:
>
> Hi Guang,
>
> Coincidentally, I was just wrestling with the same thing myself yesterday. Here is the command I used:
>
> kdensity var if (year==1999), plot(kdensity var if (year==1989)||kdensity var if (year==1979)) legend(ring(0) pos(2) label(1 "1999") label(2 "1989") label(3 "1979") )
>
> Hope this helps!
>
> Chris
>
> On Wed, Mar 3, 2010 at 10:04 AM, G. Dai <[email protected]> wrote:
>>
>> dear all,
>> I have income observation from several different years. For each year, I
>> can
>> easily draw a density curve by using kdensity. however, I'd like to have the
>> distribution
>> curves for different years on the same graph. how can I achieve that?
>> regards,
>> Guang
>>
>> *
>> * 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/