Hello,
I'm working with a panel data (210 countries) and I'm trying to draw for each country its own name. I got some assistance working out a loop but I wanted to add the countries names on each graph. I did create 'countryid' column to assign each country a specific number but I don't how to add the names on each graph.
Here's the command I'm using.
Thank you in advance.
Edit: added the proper layout for my code
I'm working with a panel data (210 countries) and I'm trying to draw for each country its own name. I got some assistance working out a loop but I wanted to add the countries names on each graph. I did create 'countryid' column to assign each country a specific number but I don't how to add the names on each graph.
Here's the command I'm using.
Code:
forvalues i = 1/210 { tsline cycle trd if countryid == `i' & year >= 1985 & year <= 2020, legend(off) graph save "Graph" "`i'.gph", replace graph export "`i'.jpg", as(jpg) name("Graph") quality(90) replace }
Edit: added the proper layout for my code
Comment