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

st: RE: RE: RE: xlabel in bar graph


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: RE: xlabel in bar graph
Date   Thu, 5 Feb 2004 20:04:03 -0000

ylThat matches my experiments to date, and that
you have hit a limitation of the command. 

I think the logic is that you have categories
and that it would be too perverse to have 
a category you didn't want to label. 

But your axis is "really" numerical. 

I think you may need to knit your own using 
-twoway bar-, something like this: 

gen gene1 = gene - 0.1
gen gene2 = gene + 0.1 
twoway bar yl gene1, barw(0.2) 
	|| bar yr gene2, barw(0.2) xla(0(5)50) 

Nick 
[email protected] 

> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]]On Behalf Of 
> FEIVESON, ALAN
> H. (AL) (JSC-SK) (NASA)
> Sent: 05 February 2004 19:43
> To: '[email protected]'
> Subject: st: RE: RE: xlabel in bar graph
> 
> 
> Then there is no way to show the label for every 5th set of 
> bars other than
> something like
> 
> over(gene,  relabel(1 "." 2 "." 3"." 4"." 6"." 7"." 8"." 9"." 
> 11"."...(all
> the way to 49)) ) ?
> 
> Even with this, I can't get it to show nothing for 
> non-multiples of 5 For
> example if I replace "." with "" or " ", I still get the 
> original x-variable
> value.
> 
> Al Feiveson
> 
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]]On Behalf Of Nick Cox
> Sent: Thursday, February 05, 2004 1:01 PM
> To: [email protected]
> Subject: st: RE: xlabel in bar graph
> 
> 
> You are missing the manual or on-line help. 
> 
> The "other" axis on a bar chart is considered 
> a categorical axis, not an x axis. Its options 
> are different. 
> 
> Example: 
> 
> . graph bar (mean) mpg , 
> over(foreign, relabel(1 "D" 2 "F")) over(rep78) 
> 
> Nick 
> [email protected] 
> 
> > -----Original Message-----
> > From: [email protected]
> > [mailto:[email protected]]On Behalf Of 
> > FEIVESON, ALAN
> > H. (AL) (JSC-SK) (NASA)
> > Sent: 05 February 2004 18:29
> > To: statalist (E-mail)
> > Subject: st: xlabel in bar graph
> > 
> > 
> > When I try to use xlabel options in a Stata 8 bar graph, I get no
> > satisfaction (see below). Also, when I go to the Stata web 
> > site, I find that
> > there  are only 2 FAQ's on Stata 8 graphics (neither of which 
> > address my
> > problem) - I find this hard to believe - what am I missing?
> > 
> > 
> > Thanks
> > Al Feiveson
> > 
> > . graph bar yl yr if gene<230.5, over(gene) legend(label (1 
> > "L-average" )
> > label (2 "R-average") ) xlabel(0(5)50)
> > 
> > xlabels(0(5)50) not allowed, xaxis1 does not exist
> > invalid syntax
> > invalid syntax
> > invalid syntax
> > r(198);
> > 
> > *
> > *   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/
> 
> *
> *   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/
> *
> *   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/

*
*   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