Hello dear Stata users, that's my first question here in this forum, so i hope that is the right way to ask such questions: I am trying to combine graphs, but the code doesn't function throughly; i.e., Stata stops after showing the first graph. I have used the same code for other countries and it was successful but not for this country's group! Can anyone tell me, what i'm doing wrong? Here is my code:
foreach i in "Afghanistan" "Iran, Islamic Rep." "Iraq" "Jordan" "Kuwait" "Lebanon" "Syrian Arab Republic" "Oman"{
twoway line GDP_log Year if Country =="`i'", xlab(1960(20)2020, labsize(small)) ///
ylab(,labsize(small)) ///
title("`i'") ///
name("`i'", replace) ///
ytitle("exponential GDP", size(small)) ///
xtitle("Year", size(small))
}
graph combine Afghanistan Iran, Islamic Rep. Iraq Jordan Kuwait Lebanon Syrian Arab Republic Oman, title("Graphic 1: GDP from 1960 to 2020" size(small)) ///
graph export "./Schema1.tif", width(4000) replace
thank you in advance.
Aida
foreach i in "Afghanistan" "Iran, Islamic Rep." "Iraq" "Jordan" "Kuwait" "Lebanon" "Syrian Arab Republic" "Oman"{
twoway line GDP_log Year if Country =="`i'", xlab(1960(20)2020, labsize(small)) ///
ylab(,labsize(small)) ///
title("`i'") ///
name("`i'", replace) ///
ytitle("exponential GDP", size(small)) ///
xtitle("Year", size(small))
}
graph combine Afghanistan Iran, Islamic Rep. Iraq Jordan Kuwait Lebanon Syrian Arab Republic Oman, title("Graphic 1: GDP from 1960 to 2020" size(small)) ///
graph export "./Schema1.tif", width(4000) replace
thank you in advance.
Aida

Comment