MA wrote:
I am trying to plot several histograms in one plot using:
twoway histogram mpg, by(X)
My question is the following: My X variable is numeric, so I am having
some precision issues with the titles of the individual histograms. For
example, if X=-0.2 the title for the corresponding histogram will come
out as being "-0.2000000029802322" which is not a very pretty title...
-----------------------------------------------
This is a precision problem. Try to declare X double precision:
sysuse auto
gen double X=0.8-foreign
twoway histogram mpg , by(X)
Hope this helps
Svend
__________________________________________
Svend Juul
Institut for Folkesundhed, Afdeling for Epidemiologi
(Institute of Public Health, Department of Epidemiology)
Vennelyst Boulevard 6
DK-8000 Aarhus C, Denmark
Phone: +45 8942 6090
Home: +45 8693 7796
Email: [email protected]
__________________________________________
*
* 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/