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

Re: st: Mismatched quote in -graph, title-


From   Philip Ryan <philip.ryan@adelaide.edu.au>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Mismatched quote in -graph, title-
Date   Tue, 10 Feb 2004 10:56:29 +1030

You have inserted a space between the option "title" and its argument. Try:

. twoway (scatter i21_65m year), title("Death")

that is, no space between "title" and "(".

Stata will sometimes forgive spaces, other times not. It can also give some interesting error messages in such circumstances.

Try:

sysuse auto

twoway scatter price mpg, title("hello")

twoway scatter price mpg, title ("hello") // note space after title
"hello invalid name
invalid syntax
r(198);

twoway (scatter price mpg), title ("hello") // note parentheses around scatter... and space after title
unmatched quote
r(198);


No doubt an expert parse-ologist would find entertainment here, but for the time being be careful with spaces.

Phil



At 10:51 AM 10/02/2004 +1100, you wrote:

Dear stata-listers,

I'm not understanding the syntax for setting graph titles in Stata 8.2. The command

. twoway (scatter i21_65m year), title ("Death")
returns the error message
unmatched quote

There's an easy work-around:
. twoway (scatter i21_65m year), title ("Death"")

creates the correct graph! But this is hardly intuitive ... any comments?

My data is just as follows:

. list

+----------------+
| year i21_65m |
|----------------|
1. | 1988 789 |
2. | 1989 789 |
3. | 1990 771 |
4. | 1991 729 |
5. | 1992 743 |
|----------------|
6. | 1993 726 |
7. | 1994 652 |
8. | 1995 603 |
9. | 1996 549 |
10. | 1997 505 |
|----------------|
11. | 1998 503 |
12. | 1999 481 |
+----------------+

Thanks for any help with this.
==========================================

James Harris

National Centre for Epidemiology and Population Health
The Australian National University
CANBERRA ACT 0200
Australia


*
* 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/
Philip Ryan
Associate Professor,
Department of Public Health
Associate Dean (Information Technology)
Faculty of Health Sciences
University of Adelaide 5005
South Australia
tel 61 8 8303 3570
fax 61 8 8223 4075
http://www.public-health.adelaide.edu.au/
CRICOS Provider Number 00123M
-----------------------------------------------------------
This email message is intended only for the addressee(s)
and contains information that may be confidential and/or
copyright. If you are not the intended recipient please
notify the sender by reply email and immediately delete
this email. Use, disclosure or reproduction of this email
by anyone other than the intended recipient(s) is strictly
prohibited. No representation is made that this email or
any attachments are free of viruses. Virus scanning is
recommended and is the responsibility of the recipient.

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