Nick Winter and Ben Jann's -splitvallabels- may also be of use.
Scott
On Wed, Jan 20, 2010 at 8:33 AM, Jeph Herrin <[email protected]> wrote:
>
>
> Something like this works (since I know my labels are <40 chars):
>
> local relabels ""
> levelsof group, local(groups)
> foreach g in `groups' {
> local label : label group `g'
> local len : length label
> if `len'>20 {
> local p1 : piece 1 20 "`label'", nobreak
> local p2 : piece 2 20 "`label'", nobreak
> local relabels "`relabels' `g' `""`p1'" "`p2'"'" '"
> }
> }
> ...
> graph hbar var1 var2, over(group, relabel(`relabel'))
>
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/