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
Reshaping data with three dimensionsHello, I am having trouble reshaping my data as it will require something beyond the usual long to w…
Regarding use Matchit to fuzzy merge two different data setHello everyone, I am trying to merge two data set by their unique string variables. However, these …
Identifying observations of var1 that have different values for var2I have a dataset in which the data are identified by state, county, and ZIP code - each of these is …
Filling missing observations with successor and predecessors ID's valuesDear Stata Users, Can you please help me with the following issue: I have a company (“gvkey”) with a…
Creating a matrix with Euclidean distances between variables.Hello everybody, I use Stata 13.1 and I am working with a dataset that contains 25 numerical variab…
Subscribe to:
Post Comments (Atom)
0 Response to Titles for graphs in loops
Post a Comment