Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: xlabel questions in graph bar options.


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: xlabel questions in graph bar options.
Date   Wed, 2 Jan 2013 16:14:13 +0000

What you are describing is inevitable with a string variable. How else
would Stata order string labels?

You just need to -encode- a string variable using pre-defined labels.
Then use the resulting numeric variable. See -help encode-.

Nick

On Wed, Jan 2, 2013 at 3:19 PM, Amadou DIALLO <stata.diallo@gmail.com> wrote:

> 1. Is there any way to label my x-axis in a non alphabetical order?
> Basically, I want to graph, putting "National" first, but Stata seems
> to be ranking the labels alphabetically.
> 1 "National" 2 "No Education" 3 "Primary" 4 "Secondary" 5 "Tertiary
> And Higher" 6 "Dk"
> DK is appearing first followed by National, etc.
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index