Statalist


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

RE: st: adding info to bar graph


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: adding info to bar graph
Date   Wed, 9 Apr 2008 19:17:49 +0100

Got it. Sorry about that. 

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Scott
Merryman
Sent: 09 April 2008 19:13
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: adding info to bar graph

On Wed, Apr 9, 2008 at 12:34 PM, Nick Cox <n.j.cox@durham.ac.uk> 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/

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