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: Problem with graph
From
Joerg Luedicke <[email protected]>
To
[email protected]
Subject
Re: st: Problem with graph
Date
Thu, 22 Aug 2013 12:12:44 -0400
On Thu, Aug 22, 2013 at 11:51 AM, Amal Khanolkar <[email protected]> wrote:
<snip>
>
> - I get the plot I need with 7 curves - which looks very good - but for some reason Stata only specifies the legend (colour) for the first two categories (sweden and arab, but not the rest). Could anyone tell me why?
The integer numbers in the legend option should refer to the order of
plots, _not_ to values in your variable -ethnicity2-. Try the
following instead:
legend(order(1 "Sweden" 2 "Arab" 3 "Somalia" 4 "SouthAsia" 5
"Ethiopia" 6 "EastAsia" 7 "Africa"))
BTW, you could also use -twoway kdensity- directly.
>
> - Also, how do I know the default pattern (and order of colours used by Stata?
see -help connect_options-, especially -lpattern()- and -lcolor()-
Joerg
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/