Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: producing graph bar help


From   "Austin Nichols" <[email protected]>
To   [email protected]
Subject   Re: st: producing graph bar help
Date   Thu, 10 Jan 2008 10:27:20 -0500

Dear Nick and "b. water":
In his first post "b. water" announces Stata 8.2 and cites [G] p.125
(presumably the Stata 8 manual).  The negative bargap option is
illustrated with

webuse citytemp, clear
gr bar tempjuly tempjan, over(div) over(reg) nofill bargap(-30)

in the Stata 10 manual [G] p.62, and it may not be clear, but the
bargap controls the relative plot position of tempjuly and tempjan,
not the positions of those two variables' bars with respect to over()
categories. Compare the following:

webuse travel, clear
drop if choice==0
g x=1
replace party=3 if party>2
gr bar (count) x, over(mode) over(party) nofill bargap(-30)
separate x, by(mode)
gr bar (count) x1 (count) x2 (count) x3 (count) x4, over(party) bargap(-30)
collapse (count) x, by(mode party)
forv i=1/4 {
 g `: label (mode) `i''=x if mode==`i'
 }
gr bar air train bus car, over(party) bargap(-30)
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index