Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: Saving multiple graphs
From
"Vitorino, Maria Ana" <[email protected]>
To
"<[email protected]>" <[email protected]>
Subject
Re: st: Saving multiple graphs
Date
Fri, 28 Oct 2011 15:08:25 +0000
Dear Nicola,
My guess is that you need to include `y' in the name of the saved plot. Otherwise it's just overwriting the file every time that the variable changes.
Something like this should work:
foreach y of varlist bwkg length pondi hcn man ssn trn {
qnorm `y'
qui graph export "f:/Nicola/SWS_India2/qnorm`y'.png", replace
}
Hope this helps,
Ana
On Oct 28, 2011, at 10:57 AM, Nicola Winder wrote:
> Dear Statalist,
>
> Does anyone know of a way to produce and save a matrix or series of graphs?
> I am simply wanting to examine the Q-Q plots of 40 variables and have tried the following:
>
> foreach y of varlist bwkg length pondi hcn man ssn trn {
> qnorm `y'
> qui graph export "f:/Nicola/SWS_India2/qnorm.png", replace
> }
>
> The loop works fine but the plots literally flash up and only the last plot is exported. Also these plots are only exploratory and will not be published so the quality does not matter.
>
> Also in R it is possible to use pairwise scatter var1 var2 var3 var4 etc to get a matrix of scatter plots does Stata do anything like this for exploratory purposes?
>
> Many thanks in advance for your help!
> (I am using Stata version 11.1 windows XP)
>
> Nicola
>
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/