Suppose you have an index plot to make for Y against X, but X is not like:
1,2,3,4,5,6,7,8,9,10 (1)
but like
1,8,9,13,18,120,140,141,142,300 (2)
If you try -scatter Y X- the gaps in X make it unattractive for some purposes. But you can instead try:
egen index = group(X), label
summ index
local xlo = r(min)
local xhi = r(max)
gr tw (scatter Y index, xlabel(`xlo'(1)`xhi', val))
Now the X axis will be as (1) but labeled as (2).
A useful little note in egen rank() for group() in the PDF help suggested this trick.
*
* 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/