On Thu, Jun 19, 2008 at 1:00 PM, Beth Gifford <[email protected]> wrote:
> Hello there, I have 2 graph questions.
>
> 1.  Splitting labels into multiline for bar graph with multiple dummy variables
> I have the following graph
> graph hbar  q6_coverage q6_currentmem q6_planmember, percentage legend(off)
> bargap(8) yvaroptions(relabel(1 "Observed Summit Coverage in Local Media"  2
> "Current DO prevention workgroup or Organization Member"  3 "Planning to serve
> on a do prevention workgroup post-summit"))
>
> I can't figure out how to break up the long lines for the 3 different variables.
>  yvaroptions does not allow multi-line labels.  Legend does--but that is not
> what I am looking for.  These are 3 different dummy variables so I don't think
> the over(relabel) options are what I am looking for.  any suggestions?
Each line needs to be in double quotes and then bind the label in
compound quotes.
sysuse auto,clear
graph hbar mpg gear, percentage legend(off) showyvars ///
 yvaroptions(relabel(1 `"`""Current DO prevention workgroup" "or
Organization Member""'"' ///
 2  `"`""Planning to serve on a do" "prevention workgroup post-summit""'"' ))
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/