Bookmark and Share

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]

st: looping twoway graph


From   Lanciné Condé <condela73@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: looping twoway graph
Date   Tue, 24 Jan 2012 23:25:19 +0100

Dear All
I had a sample of 68 developing countries. I want to chart var1 and
his trend for only 13 of them (not necessairely consecutives).
I have created a dum called ecowas=1 for each of the 13 countries of
interest. Then I implemented the following commands:

keep ecowas==1
levelsof cbm, local(id)
foreach i of local id {
local lab: label cbm `i'
twoway (line var1 an if cbm==`i', clpattern("-###") sort clwidth(0.6))
(line trendvar1 an if cbm==`i', sort), scheme(s1mono) subtitle(`lab')
graphregion(fcolor(none) lcolor(none) lwidth(none) lpattern(blank))
saving(`lab'tcer)
}

By doing so I obtain more graphics than I want. First I have the13
graphics escompted then 55 more blank graphics. Can anyone help me to
stop after the 13 graphics I need?

Best Regards
*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index