Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Change justification of label in graph (stata 11)


From   "Kaulisch, Marc" <kaulisch@forschungsinfo.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Change justification of label in graph (stata 11)
Date   Mon, 10 Oct 2011 06:48:04 +0200

Hi Statalisters,

I wrap a long label into two lines but now I want them to appear as
centered (in a graph bar; actually using -catplot- from ssc). I cannot
find a way to do it in the cat_axis_label_options. Does someone knows a
way to do this?

The right justification for the relabel two lines looks a little bit
silly; as you can see in  example:
Sysuse nlsw88, clear
Egen ex = group(industry race)
Catplot union industry race, percent(ex) stack var3opts(relabel(1
`""White""example""' 2 `""Black""example""' 3 `""Other""example""'))

A preliminary solution for me is to skip the two line option and make a
vertical angle:
Catplot union industry race, percent(ex) stack
var3opts(label(angle(vertical)))


Best wishes,


Marc

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


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index