So, the first set of graphs I created w/o any problem using my brute-force solution is below
(where a1 is the string variable containing the governorate name, f1=1 is a completed interview)
Code:
foreach l in local govern { preserve keep if a1=="`l'" & f1==1 ... count if pmatch>=.85 local matches=`r(N)' count if f1==1 local denom=`r(N)' local number=(`matches'/`denom')*100 hist pmatch, bin(25) title(`l') xline(.85) saving("$qc\pmatch_`l'.gph", replace) color(%75) /// xlabel(0(.1)1, labsize(tiny)) ylabel(0(2)10, labsize(tiny)) text(8 0.85 "Percent of" "near-duplicates:" "{bf:`: di %2.0f `number''%}", size(vsmall) placement(e)) ... restore }
I'm now trying to do something similar, but with a very large number of by graphs (as in the below), and would like the analogous added text for each one...whereas in the above, I was making graphs for each geographic region, in the code below I am trying to make a single graph for each region with by graphs by interviewer within each region. In other words, within a new loop, I want to write something like this:
Code:
hist pmatch if a1=="`l'", by(interviewer)
Appreciate any assistance or links to solutions already posted I may have missed.
0 Response to added text specific to each by graph
Post a Comment