Bookmark and Share

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: Thread-Index: Ac049lzDw8LzBnUBQd+6mSCfgPrdJg==


From   Austin Nichols <austinnichols@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Thread-Index: Ac049lzDw8LzBnUBQd+6mSCfgPrdJg==
Date   Wed, 23 May 2012 14:25:34 -0400

Amal Khanolkar <Amal.Khanolkar@ki.se>:
Try also :

ssc inst vioplot, replace
ssc inst byhist, replace
clear all
webuse nhanes2
la var race "Race"
loc c vioplot bpsystol [pw=finalwgt]
`c' if race==1, ti(`:lab race 1') den(col(blue)) name(r1)
`c' if race==2, ti(`:lab race 2') den(col(green)) name(r2) ysc(off)
`c' if race==3, ti(`:lab race 3') den(col(edkblue)) name(r3) ysc(off)
gr combine r1 r2 r3, nocop ycommon row(1) name(vio)
byhist bpsystol, by(race) frac tw(leg(col(1)))


On Wed, May 23, 2012 at 11:44 AM, Nick Cox <njcoxstata@gmail.com> wrote:
> "plot distributions" is a bit open-ended, but
>
> -twoway kdensity-
>
> -dotplot-
>
> -distplot- (SJ)
>
> -qplot- (SJ)
>
> -stripplot- (SSC)
>
> give you some ways of approaching this. FWIW, different colours are
> not needed (or even possible) with -dotplot-.
>
> On Wed, May 23, 2012 at 4:11 PM, Amal Khanolkar <Amal.Khanolkar@ki.se> wrote:
>
>> I would like to know how I can plot several distributions of a continuous variable, say birth weight in different colours  by ethnic groups in the graph?
>
> *
> *   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index