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

st: RE: How to display two distributions in one histogram?


From   "Scott Merryman" <smerryman@kc.rr.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: How to display two distributions in one histogram?
Date   Wed, 19 May 2004 19:57:59 -0500

Jie,

Do you mean something like this:

sysuse auto

twoway (histogram weight if fore == 0, density blcolor(gs12) ///
 blwidth(medthick) bfcolor(gs15) legend(label(1 "Domestic"))) ///
(histogram weight if fore == 1, density blcolor(blue) blwidth(medthick) ///
 bfcolor(none)legend(label(2 "Foreign")) )

Scott

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Jie Chen
Sent: Wednesday, May 19, 2004 9:51 AM
To: statalist@hsphsun2.harvard.edu
Subject: st: How to display two distributions in one histogram?

A cubersome process is possible to tackle this, but I wonder any simple 
solution?

for example:
histogram price, by (foreign)

This will display two separate histograms, but I want them in one.

Thanks!


Jie Chen

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