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

RE: st: RE: format of y axis labels on hist


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: RE: format of y axis labels on hist
Date   Fri, 6 Jun 2003 13:01:02 +0100

R. Allan Reese

> It would be nice to apply another design idea, which is to scale the
> labels to 1 or 2 digits, with the scaling explained in the
> title.  Eg
>
> gen thou=1/1000
> hist y [weight=thou], freq ylab(10(10)40,ang(h)) \*
> */                      ti(Freq of y) t2(in thousands)
>
> Unfortunately, hist only allows integer weights.  I can't see why.

Another way of doing this therefore:

hist y, freq ylab(10000 "10" 20000 "20" 30000 "30" 40000 "40",ang(h))
...

That is a little repetitive, but the cures which spring to mind,
such as

forval i = 1/4 {
	local mylab `"`mylab' `i'0000 "`i'0""'
}
hist y, freq yla(`mylab', ang(h))

are here worse than the disease...

Nick
[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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index