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
import test.xmlDear All, Suppose that I run the following regressions and use (ssc install) outreg2 to save estimat…
How to create balanced dataset from unbalanced datasetHi all, I have a dataset which looks like this: Code: * Example generated by -dataex-. To install…
Import delimited - ignoring linebreaksHello, I have (random) linebreaks that I cannot remove with Notepad++ before importing. Three observ…
Probit versus marginsDear all, I am testing the effect of a policy using a DID strategy, I get positive and significant …
Plotting polynomial regressionHi there, I am trying to plot a polynomial regression between the variables hiscam and my third ord…
Subscribe to:
Post Comments (Atom)
0 Response to Problem with exporting graphs in a loop
Post a Comment