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

st: RE: -format %9.0g- displays commas in -graph box-


From   Daniel Müller <d.mueller@agr.uni-goettingen.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: -format %9.0g- displays commas in -graph box-
Date   Sun, 9 Feb 2003 18:32:46 +0100

> I am graphing some data with -graph hbox-, but one variable 
> insists on displaying commas in the graph (but not when 
> -list-ed). The -format- seems to be ok. Here is what I do:
> 
> ------------begin------
> . d yincrop
> 
>               storage  display     value
> variable name   type   format      label      variable label
> ---------------------------------------------------------------
> yincrop         int    %9.0g       yincrop    Year
> 
> 
> . graph hbox yincrop, over(idcrop, sort(1))
> ------------end------

Answering my own question... The only way I found to solve this not very
elegant:

. graph hbox yincrop, over(idcrop, sort(-1)) ylabel(1975 "1975" 1980 "1980"
1985 "1985" 1990 "1990" 1995 "1995" 2000 "2000")

That's a bit tedious (and I am lucky that the numlist is not much longer),
but the only solution that seems to work for -graph hbox-.

Greetings,
Daniel


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