-mylabels- is more general than this,
at the price, inevitably, of a more elaborate syntax.
Nick
[email protected]
Nick Winter
> If you find yourself doing this a lot, you can use a program
> to generate
> the label string. Something like this:
>
> program faclbl, rclass
> syntax anything(name=numlist id="Label List") , ///
> [ Factor(int 100) local(string) ]
>
> numlist "`numlist'"
> foreach v in `r(numlist)' {
> local newlbl `"`newlbl' `v' "`=`v'*`factor''""'
> }
>
> return local label `newlbl'
> if "`local'"!="" c_local `local' `newlbl'
> end
>
>
> Then you could type
>
> . faclbl -6[2]6 , local(xlab)
>
> . graph twoway scatter .... , xlabel(`xlab') ...
*
* 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/