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
Marginal Probability Effect in regoprobHi, I am using regoprob command for estimation. My dependent variable having 10 categories and I am …
item-rest correlation using Spearman?Hi, I'm wondering if there is a way to get item-rest correlation, as you get from the command alpha…
Improve regression interpretations with and without fixed effectsI have unbalanced panel data where 2213 companies from 32 different countries report several measure…
Need help with survival analysisDear Stata specialist, I need help with survival analysis, here is the story. I am currently workin…
bysort | first non-missing calculationHello all: I am trying to retrieve the earliest or first non-missing anycomp by studyid and the cod…
Subscribe to:
Post Comments (Atom)
0 Response to Problem with exporting graphs in a loop
Post a Comment