Hallo everybody
I have a problem with exporting my graphs in png format in a loop. It only saves one graph with the title of the local macro:
"wellbeing_affraid wellbeing_nervous wellbeing_panic wellbeing_concern"?
My code looks like this:
cd "E:\Projectdata"
use Input\studypopulation, clear
local anxiety wellbeing_affraid wellbeing_nervous wellbeing_panic wellbeing_concern
foreach var of local anxiety {
twoway hist `var', freq yla(,format(%5.0f) ang(h)) width(1) discret xla(0/4, valuelabel noticks) barw(0.8) ytitle(Antal gravide kvinder)
graph export "Graphs/`anxiety'.png", as(png) replace
}
I really can't figure out what's the problem with the export command?
Kind regards Frank
Related Posts with Problem with exporting graphs in a loop
Imputing missing state-years using average of surrounding yearsHello, I have a state-year panel dataset, which is mostly balanced except for one missing year in W…
All Dates on Data Editor Coming Up as .Hello! Currently new to operating STATA. My Data Editor does not show any dates despite me having d…
Create a Dummy indicating country pair has appeared previously in different variable Code: * Example generated by -dataex-. For more info, type help dataex clear input float(Year count…
Taking strings out of file namesI scraped together some xls files using the almighty Python. Before I can/want to work with these fi…
How can I use pweight by hand?Dear statalists: I want to use a mirco sampling data in R,but the package used in R is systemfit whi…
Subscribe to:
Post Comments (Atom)
0 Response to Problem with exporting graphs in a loop
Post a Comment