Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Multiline Relabeling graph & plotting piecharts with foreach


From   "Scott Merryman" <scott.merryman@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Multiline Relabeling graph & plotting piecharts with foreach
Date   Thu, 19 Jun 2008 14:44:54 -0500

On Thu, Jun 19, 2008 at 1:00 PM, Beth Gifford <beth.gifford@duke.edu> 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/



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