Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Controlling look of variable labels in onewayplot


From   David Harless <[email protected]>
To   [email protected]
Subject   st: Controlling look of variable labels in onewayplot
Date   Tue, 03 Aug 2004 16:44:47 -0400

In Stata Journal Volume 4(1) page 76, I saw the nice example using onewayplot in Nick Cox's "Speaking Stata" column. I am trying to use onewayplot but control how the "byvar" label looks. My byvar is named dec_all and I've put in extra spaces to make the value labels line up a certain way -- at least in a fixed-width font:

. table dec_all
------------------------------
dec_all | Freq.
------------------+-----------
< 3.77 | 14,665
3.77- 11.67 | 4,228
11.67- 38.75 | 2,208
38.75- 50.08 | 689
50.08- 60.23 | 502
60.23- 76.93 | 491
76.93- 140.19 | 410
140.19- 248.67 | 347
248.67-2,476.99 | 186
2,477.00< | 22
------------------------------

I'd like to make the labels keep this approximate relationship when I used the variablelabels option in onewayplot, but when I issue the following command

onewayplot myvar , by(dec_all) stack msize(*.75) ///
variablelabels ytitle("") ms(oh)

I find that
(i) my labels are partly cut-off (e.g. ".67-2,476.99" instead of "248.67-2,476.99") and
(ii) my labels are all right-justified against the y axis instead of looking something like they do in the table above.
Any suggestions on how to handle this?

Thanks,
Dave Harless



*
* 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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index