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

From |
vwiggins@stata.com (Vince Wiggins, StataCorp) |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Odd behavior of -graph hbar- with value labels containing apostrophes |

Date |
Mon, 03 Sep 2007 23:14:47 -0500 |

Dan Waxman <dan@amplecat.com> writes, > I am trying to make bar graphs over categorical variables, with > value labels, e.g.: > > . graph hbar(mean) satisfied, over(q12) > > In this situation, the value labels extend off the edge of the y > axis, such that only a couple of letters appear. > > . label list q12 > q12: > 1 definitely true > 2 somewhat true > 3 no strong opinion > 4 somewhat untrue > 5 definitely untrue > 6 don't know/refused > > If I do the following: > > . label define q12 6 "do not know/refuse", modify > . graph hbar(mean) satisfied, over(q12) > > Then it looks as it should. > [...] The left quote in "don't ..." is causing problems when the length of the label is computed, and this leads to leaving too little room for the graph's right axis. I am hopeful that this can be fixed in the next ado update, but if not it will be fixed in the one after that. It's not pretty, and it takes some trial and error, but in the interim Dan can work around this by adding some space "by hand" using the option -graphregion(margin(l=25))-. I am just guessing at the "25"; Dan will need to play with that number until things look right. -- Vince vwiggins@stata.com * * 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/

**Follow-Ups**:**RE: st: Odd behavior of -graph hbar- with value labels containing apostrophes***From:*"daniel waxman" <dan@amplecat.com>

- Prev by Date:
**Re: st: Graph Edits** - Next by Date:
**RE: st: Odd behavior of -graph hbar- with value labels containing apostrophes** - Previous by thread:
**st: Odd behavior of -graph hbar- with value labels containing apostrophes** - Next by thread:
**RE: st: Odd behavior of -graph hbar- with value labels containing apostrophes** - Index(es):

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