Hi all,

I'm making a graph (see below) that uses the twoway graph by() option. As you can see, because i'm specifying note() in the main options of the twoway and because the by() option just repeats them, i'm ending up with one note which is repeated for each graph. What i'd like to do is adjust the notes so they each reflect the N of the sample i'm plotting.

Is this possible to do with syntax? if not, i'll just do it in the graph editor as this graph is otherwise exactly what i want. See fictitious data example + code below to replicate the graph

Best,
Chris

Code:
clear
input float(wk_dist_eff_nov16 election_2016_11 motorvoter)
26 1 1
 8 1 0
 8 0 0
32 1 0
29 1 0
32 0 1
37 1 0
 3 0 1
 7 1 0
 4 1 0
33 1 0
30 1 0
29 1 0
 5 1 0
 4 1 0
31 1 0
 3 1 0
26 1 0
25 1 0
16 1 0
33 1 0
23 1 1
35 1 0
28 1 1
32 1 0
33 1 0
28 1 0
26 1 0
33 1 0
30 1 0
 5 1 0
 4 1 0
 4 1 0
12 1 0
25 0 0
 3 1 0
32 1 0
32 1 0
 3 1 0
32 1 0
34 1 0
31 1 0
 8 1 0
 5 1 0
 4 1 0
 8 1 0
27 1 0
12 1 0
19 1 1
 8 0 0
end
label values election_2016_11 election_2016_11_l
label def election_2016_11_l 0 "No vote", modify
label def election_2016_11_l 1 "Vote", modify
label values motorvoter motorvoter
label def motorvoter 0 "Regular", modify
label def motorvoter 1 "Motor Voter", modify


twoway (lowess election_2016_11 wk_dist_eff_nov16, lcol(black) lwidth(medium)), by(motorvoter, title("Propensity to vote against distance in weeks between registration and election", col(black) size(medsmall)) note("")) ///
       bgcol(white) graphregion(col(white)) ylab(,angle(0) format(%9.2f)) ysc(extend) ///
       xtitle("Weeks from 2016 general election") ///
       xsc(titlegap(*5)) ytitle("Lowess smoothed values of likelihood to vote") ysc(titlegap(*5)) xlab(#10) note("{it:n}= 89,510") name(week_lowess, replace)
Array