Statalist


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

Re: st: Error "too many options" in twoway graph


From   =3D?windows-1252?Q?Andr=3DE9_Jeannin?=3D <[email protected]>
To   [email protected]
Subject   Re: st: Error "too many options" in twoway graph
Date   Fri, 13 Jul 2007 11:29:13 +0200

Thanks. With trace on, it appears that the 'caption()' option is repeated
119 times! The same happens when note() is used instead of caption().
Without that option, the code runs without error.

If need be, I can send you the data I'm using.

Thanks again.

Andre


On Fri, 13 Jul 2007 00:08:18 +0200, Scott Merryman
<[email protected]> wrote:

> You could try -set trace on- to find where the problem occurs.
>
> Also, can you replicate this problem with Stata data set?
>
> The example below works even though two of the value of rep78 only
> produce one graph:
>
>
> sysuse auto,clear
> levelsof rep, local(levels)
> foreach l in `levels' {
>       preserve
>       keep if rep =3D=3D `l'
>       local t1  title1
>       local t2  titre2
>       local t3  titre3
>       local t4  titre4
>       local t5  titre5
>       twoway scatter price mpg , title(,justification(left) size(tiny)
> )   || lfit price mpg ,  ///
> =09 by(fore, subtitle("`t1'" "`t2'" "`t3'" "`t4'" "`t5'"
> ,justification(left) ) ///
> =09 caption("`note'`l'" ,size(tiny) )) ylabel(, angle(horizontal))
> name(gr`l', replace)
>         restore
>          }
>
> Scott
>
>
> On 7/11/07, Andr=E9 Jeannin <[email protected]> wrote:
>> Hello list,
>> I'm using the following code to generate a series of graphs:
>>
>> levels table , local(mtable)
>> foreach mt in `mtable' {
>>          preserve
>>          keep if table =3D=3D `mt'
>>          local t1 =3D serie + ". " + titre1
>>          local t2 =3D titre2
>>          local t3 =3D titre3
>>          local t4 =3D titre4
>>          local t5 =3D titre5
>>          twoway (scatter y year , title(,justification(left) size(tiny)
>> ) )
>> || lfit y year , ///
>>                  by(affect1a, subtitle("`t1'" "`t2'" "`t3'" "`t4'"
>> "`t5'"
>> ,justification(left) ) caption("`note'`mt'" , size(tiny))) ///
>>                  ylabel(, angle(horizontal))
>>         restore
>>       }
>>
>> This works fine for most of the values of mt, but for two values I get a
>> "too many options" error message. These two values would generate only
>> two
>> graphs on each page (according to affect1a), i.e. fewer than most of the
>> other pages which are generated without problem. The data used for the
>> graphs are fine, no missing values, right type, etc.
>>
>> Thanks for any help.
>>
>> Andre
>>
>>
>
> *
> *   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/



--=20
Andre Jeannin
Institut universitaire de medecine sociale et preventive (IUMSP)
Unit=E9 d'evaluation de programmes de prevention (UEPP)
Universite de Lausanne
Rue du Bugnon 17, CH 1005 Lausanne
Tel. +41 21 314 7376 (lu,je) 7296(ma,me,ve)
Fax +41-21-31472-44
email [email protected]
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
*
*   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