Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: labels in -hbar- with over() and sort() specified


From   Joshua Dewbre <jdewbre@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: labels in -hbar- with over() and sort() specified
Date   Wed, 11 Apr 2012 13:33:11 +0200

Dear Statalist,

I'm having trouble with labeling in -hbar- when using both (over) and
(sort) options. Consider:

**
sysuse auto, clear
ta  headroom, g(z)
drop z6-z8
gr hbar (mean) z*  , over(for)  ///
yvaroptions(relabel(1 "m_z1" 2 "m_z2" 3 "m_z3" 4 "m_z4" 5 "m_z5")) ///
blabel( name, size(small)) legend(off)
**

Good. But now I want things sorted by magnitude:

**
gr hbar (mean) z*  , over(for)  ///
yvaroptions(relabel(1 "m_z1" 2 "m_z2" 3 "m_z3" 4 "m_z4" 5 "m_z5") ///
sort(1)) blabel( name, size(small))  legend(off)
**

Now the labels don't correspond to the bars (in Domestic).

Any suggestions? I'm on Stata 11.2.

Thanks,

Josh

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index