Bookmark and Share

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

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

Re: st: xlabel questions in graph bar options.

From   Nick Cox <>
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-.


On Wed, Jan 2, 2013 at 3:19 PM, Amadou DIALLO <> 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:

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