One answer is to be found in a concurrent thread:
. gen SX1 = string(X1, "%02.1f")
. twoway histogram mpg, by(SX1)
Nick
[email protected]
MA V
> Svend replied:
>
> This is a precision problem. Try to declare X double precision:
>
> sysuse auto
> gen double X=0.8-foreign
> twoway histogram mpg , by(X)
> -------------------------------------------------
>
> Unfortunately in my case this does not seem to work...
> Suppose you do
>
> sysuse auto, clear
> gen X=0.8-foreign
> gen double X1=X
> twoway histogram mpg , by(X1)
>
> this still gives histograms with not so pretty titles...
>
> How can I create histograms by X, with nice titles, and
> without losing the
> order of the histograms?
>
*
* 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/