Hello everyone,
I'm trying to save some graphs, and the code is working for saving them, but I can't seem to title them anything useful.
Here is the code:
levelsof Fullid, local(cpm)
foreach i in `cpm'{
twoway connected mhos cpn if Fullid==`i', title("`i'")
qui: graph export "$Raw Data`i'.pdf", replace as(pdf)
}
My problem is that I'd like to use the values of Fullid as the title, but because I'm using levelsof for the loop I just end up with each graph being titled 1, 2, 3 (etc. for each level of Fullid). Does anyone have a work around for this?
Related Posts with Titles for graphs in loops
GEE coefficientsDear STATALIST, I am running a Generalized Estimating Equation in STATA with link(log) corr(indepen…
ANOVA with Holm CorrectionHi all, I’ve been asked to run an ANOVA with a Holm correction. I need to compare Stigma (continuou…
Creating additional records for overlapping event windows to merge the two datasetsDear Statalist Users, I have a problem with merging the two datasets. I work in Stata 15. The first…
Average marginal effect & Marginal effects at the averagesEstimating a logistic regression, estimating the effect of X on Dummy. Controlling for C1 and C2. (c…
do file editing - period appears after double spaceHello Stata Folk When I enter two spaces in the do file editor (i.e. press the space bar twice) the…
Subscribe to:
Post Comments (Atom)
0 Response to Titles for graphs in loops
Post a Comment