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

Re: st: RE: long labels in -graph bar-


From   Nick Winter <[email protected]>
To   [email protected]
Subject   Re: st: RE: long labels in -graph bar-
Date   Wed, 07 Jan 2004 10:57:47 -0500

At 01:46 PM 1/6/2004 -0600, you wrote:
There isn't a way for Stata to automatically wrap your existing value
labels, but you can use the -relabel- suboption with the -over- option
to give your labels two lines.  To create a two-line bar label, you'll
need to include each line of your label in double quotes, and then
enclose the entire label in compound double quotes.  For example, try
the following:

. graph bar (asis) rate, over(ever, relabel(1 `""Parents ever" "self
employed""' 2 `""Parents never" "self employed""')) over(sex)


Derek Wagner
<[email protected]>
I've just written a small program, -splitvallabels-, which creates this relabel() option automatically. With it, you could type:

. splitvallabels ever
. graph bar (asis) rate, over(ever `r(relabel)') over(sex)

to get what you want. I'll notify the list when the program is available on SSC for download.

--Nick Winter


--------------------------------------------------------
Nicholas Winter 607.255.8819 t
Assistant Professor 607.255.4530 f
Department of Government [email protected] e
308 White Hall falcon.arts.cornell.edu/nw53 w
Cornell University
Ithaca, NY 14853-4601
*
* 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