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

st: RE: Graphing limitations / questions


From   "Scott Merryman" <smerryman@kc.rr.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Graphing limitations / questions
Date   Thu, 11 Nov 2004 16:21:54 -0600

> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-
> statalist@hsphsun2.harvard.edu] On Behalf Of Fredrik Wallenberg
> Sent: Thursday, November 11, 2004 3:11 PM
> To: statalist@hsphsun2.harvard.edu
> Subject: st: Graphing limitations / questions
> 
> I have a few graphs that I cannot seem to create using Stata 8.
> Perhaps someone could point me in the right direction (or confirm that
> it can't be done ... without creating a new dataset).
> 
> I have two multiple choice survey questions. I would like to visualize
> the combinations of the answers in one out of three ways.
> 

<snip>
 
> C) use -histogram, by-, BUT get ONE graph, treating the -by- options
> as separate variables in the same graph. Once again this seems like a
> reasonable thing to do but Stata doesn't have any support for it (that
> I can tell).
> 

You can use multiple -histogram- statements.  For example:

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



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