Statalist The Stata Listserver


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

st: RE: histogram plot with lines


From   "Scott Merryman" <smerryman@kc.rr.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: histogram plot with lines
Date   Fri, 17 Nov 2006 05:17:30 -0600

I don't know if the undocumented command -twoway__histogram_gen- is
available in Stata 8, if so, this should work:

sysuse auto,clear
histogram mpg
twoway__histogram_gen mpg,  start(12) bin(8) gen(h x)
drop if x==.
keep x h
expand 2
sort x
replace x = x[_n+1] if _n <_N
replace x = x + `r(width)' in l
drop if h ==.
twoway line h x, name(gr2,replace)  xlabel(minmax)

Scott


> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-
> statalist@hsphsun2.harvard.edu] On Behalf Of Munro, Cameron
> Sent: Friday, November 17, 2006 2:16 AM
> To: statalist@hsphsun2.harvard.edu
> Subject: st: histogram plot with lines
> 
> I'm looking for a package that would allow me to plot a histogram but
> display as a line chart rather than as bars as per hist. Is anyone aware
> of such a package? I'm using Stata 8.
> 
> Many thanks,
> 
> Cameron.
> 



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