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

Re: st: RE: about graphics


From   Hailing Zang <hlzang@yahoo.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: about graphics
Date   Wed, 20 Nov 2002 07:48:35 -0800 (PST)

Thanks a lot! But how to download "levels" from SSC? 

Hailing
--- Nick Cox <n.j.cox@durham.ac.uk> wrote:
> Hailing Zang
> > 
> > How to save graphs in a loop? For example, I have
> the
> > code:
> > 
> > by t: graph price quantity
> > 
> > Then I will get each graph for each t, but how can
> I
> > save the graphs in a loop?
> 
> Here is one way to do it. 
> 
> Download -levels- from SSC. 
> 
> If t is a numeric categorical variable, 
> 
> . levels t, local(levels) 
> 
> . foreach l of local levels { 
> .	graph price quantity if t == `l', saving(g`l')
> t1(`l') 
> .     more 
> .} 
> 
> The -more- is optional. 
> 
> If t is string, it is the same apart from 
> 
> ... if t == "`l'" ... 
> 
> There are relevant examples in 
> Stata Journal 2(2), 202-222 (2002) 
> or at 
>
http://www.stata.com/support/meeting/8uk/fortitude.pdf
> 
> In addition, some of the technique at 
> http://www.stata.com/support/faqs/data/for.html
> may be useful background. 
> 	
> Nick 
> n.j.cox@durham.ac.uk 
> 
> *
> *   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/


__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site
http://webhosting.yahoo.com
*
*   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