Statalist The Stata Listserver


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

Re: st: Drawing histograms


From   "Alan Neustadtl" <[email protected]>
To   [email protected]
Subject   Re: st: Drawing histograms
Date   Fri, 26 Jan 2007 08:11:30 -0500

The following may be what you want:

sysuse auto, clear
hist rep78 if foreign==0, discrete title("Domestic") name(g1, replace)
hist rep78 if foreign==1, discrete title("Foreign") name(g2, replace)
graph combine g1 g2, xcommon ycommon

Best,
Alan

On 1/25/07, Lucy @ Mac <[email protected]> wrote:
Hi,

I'd like to graph two categorical variables in one histogram to compared
var1 to var2. What's the best way to do that? These variables are actually
continuous variables, coded as categorical variables 1-7. Each code
represents a days-range.
Input most appreciated.
For those in Australia - Happy Australia Day!

Lucy


*
*   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/

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