![]() |
From | Jeph Herrin <junk@spandrel.net> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: AW: AW: st: wrapping axis labels in -graph hbar- |
Date | Wed, 20 Jan 2010 11:30:08 -0500 |
see my followup post for a first stab at this. cheers, J Martin Weiss wrote:
<>If you had different -over()-s, an algorithm that let`s you decide whether a -label- is "too long" to look good on the graph would be needed, and code that would break the lines for you and put them in the proper format for -relabel()- to digest. Doable, but difficult... HTH Martin -----Ursprüngliche Nachricht----- Von: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Jeph Herrin Gesendet: Mittwoch, 20. Januar 2010 15:15 An: statalist@hsphsun2.harvard.edu Betreff: Re: AW: st: wrapping axis labels in -graph hbar- Large number of graphs, but the same -over()- option for each, so can code manually if needed. But would be nice to store in a macro. J Martin Weiss wrote:<>Any way to automate this solution? You said you had a "large number of graphs"... HTH Martin -----Ursprüngliche Nachricht----- Von: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Jeph Herrin Gesendet: Mittwoch, 20. Januar 2010 15:00 An: statalist@hsphsun2.harvard.edu Betreff: Re: st: wrapping axis labels in -graph hbar- Of course. I think I used to know that. thanks, Jeph Scott Merryman wrote:Like this? sysuse auto,clear graph hbar mpg trunk turn, over(rep78, relabel(1 `""A Very Very Very" "Very Long Label""')) Scott On Tue, Jan 19, 2010 at 3:26 PM, Jeph Herrin <junk@spandrel.net> wrote:I'm generating a large number of graphs, all of which are horizontal bar graphs: graph hbar var1 var2, over(group) My problem is that several -group- category labels are quite long, so that the figure is compressed to the right to make room. Ideally (that is, rather than chopping down and/or footnoting) there would be a way to wrap these labels into two lines. Since each -group- value has two bars, there is plenty of space for two lines of text; however, I cannot find a way to wrap the text, even if I manually break it up into fragments. Any ideas? By the way, I have tried shrinking the labels: graph hbar var1 var2, over(group, label(labsize(small))) but this doesn't solve the problem (and doesn't look very good). thanks, Jeph * * 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/* * 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/* * 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/ * * 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/* * 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/ * * 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/
* * 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–2025 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |