Statalist


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

Re: st: adding info to bar graph


From   "Scott Merryman" <[email protected]>
To   [email protected]
Subject   Re: st: adding info to bar graph
Date   Wed, 9 Apr 2008 13:13:01 -0500

On Wed, Apr 9, 2008 at 12:34 PM, Nick Cox <[email protected]> wrote:
> "5" looks like a typo: delete it.

No, in this case I am using the -text()- option; the "5" specifies the
location on y-axis for the text boxes.

As Nick pointed out the the line appends stuff to the local macro as
it loops through the levels of rep78.

If you -set trace on- you can see work it through adding text to the
local macro:

- foreach l of local levels {
...
- local mytext "`mytext' 5 `l'   "`n'/`d'"  "
= local mytext " 5 1   "0/2"  "
- }
...
- local mytext "`mytext' 5 `l'   "`n'/`d'"  "
= local mytext " 5 1   "0/2"   5 2   "0/8"  "
- }
...
- local mytext "`mytext' 5 `l'   "`n'/`d'"  "
= local mytext " 5 1   "0/2"   5 2   "0/8"   5 3   "3/30"  "
...
...

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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index