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

Re: st: Help with graph bar


From   n j cox <[email protected]>
To   [email protected]
Subject   Re: st: Help with graph bar
Date   Mon, 19 Dec 2005 13:58:55 +0000

I get the error message

1invalid syntax
invalid syntax
invalid syntax
r(198);

Look carefully at the first line. Stata is choking on
the "1". Inserting spaces fixes the problem:

#delimit ;
graph bar x1 x2 x3 x4 x5,perc over(category)
  	    legend(label(1 "in 15 minutes")label(2 "in 30
minutes")label(3 "in 45 minutes")label(4 "in 60 minutes")label(5 "more than
60 minutes"))
  	    title("% of population")
  	    subtitle("by category")
  	    ytitle("Percentage");
   #delimit cr

Mosca, Ilaria

I would like stata to generate the following graph bar, and I type the
following commands:

#delimit ;
graph bar x1 x2 x3 x4 x5,perc over(category)
 	    legend(label(1"in 15 minutes")label(2"in 30
minutes")label(3"in 45 minutes")label(4"in 60 minutes")label(5"more than
60 minutes"))
 	    title("% of population")
 	    subtitle("by category")
 	    ytitle("Percentage");
  #delimit cr

However, when I run these commands I obtain an invalid syntax message.
What is wrong with it? I've been looking at the manual and website, but
I don't seem able to find the right answer for this.
*
*   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