Statalist


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

RE: st: producing graph bar help


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: producing graph bar help
Date   Thu, 10 Jan 2008 15:43:42 -0000

That's very probably it. There have to be two or more response variables
on the graph for this to bite. That's not the case in the examples
barley [or is it "brandy"] water and I am discussing. 

A most helpful clarification: Thanks! 

Nick 
[email protected] 


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Austin
Nichols
Sent: 10 January 2008 15:27
To: [email protected]
Subject: Re: st: producing graph bar help

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