Statalist


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

Re: st: [Graphics] how to set the length of an axis?


From   Ulrich Kohler <[email protected]>
To   [email protected]
Subject   Re: st: [Graphics] how to set the length of an axis?
Date   Tue, 24 Mar 2009 10:00:31 +0100

Am Dienstag, den 24.03.2009, 09:09 +0100 schrieb Antoine Terracol:
> Ulrich,
> 
> I can confirm that the bars do not overlap using Stata 10.1 for Windows 
> XP, but do overlap slightly using Windows 10.1 for Linux (Ubuntu 8.10, 
> 64 bits).
> 
> The culprit is not -autocode- since -levelsof- spits out the same values 
> in both cases. Bug or feature?

This is for StataCorp. If it were a feature, it should be available for
all operating systems. 

I repost a minimal example for the weired behavior and add, that I used
Stata/SE 10.1 for Unix, born 02 Feb 2009 on Linux 2.6.24-23-generic with
GNOME 2.22.3 (Ubuntu 8.04). 

--------------------------------------------------minimal.do
webuse nlswork.dta, clear

gen wage=exp(ln_wage)
su wage, de
drop if wage>r(p99)

sum wage, meanonly
gen wageclass = autocode(wage,32,r(min),r(max))
by year wageclass, sort: gen wageperc = _N/r(N)

sum wageperc, meanonly
replace wageperc = wageperc/r(max) * .90

gen lower = year
gen upper = year + wageperc

levelsof wageclass, local(K)
local width  = (`:word 2 of `K'' - `:word 1 of `K'')
twoway rbar lower upper wageclass, barwidth(`width') horizontal    
exit
------------------------------------------------------------------




-- 
[email protected]
030 25491-361

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