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
Lag not working for monthly/quarterly dataI am struggling with this issue and can't understand, why it's not working. I have quarterly cross-s…
Mean on a graph pieHello. I have two variable : one is continous, the other is trinary. I want to make a graph pie of t…
Merging two continuous variables in the same datasetHi, I have two variables: 1) age of initiating cigarette use with values from 10-23 and 2) age of i…
reghdfe errors message : class FixedEffects undefinedI tried reghdfe for the first time and I used the following code to use reghdfe But I get this error…
Identify variables in a rangeHello, Can you please help me with the following issue: I would like to identify the ids of the com…
Subscribe to:
Post Comments (Atom)
0 Response to Problem with exporting graphs in a loop
Post a Comment