Hello.
I am trying to create graphs that loop over a variable (mem_id ). But I would also like to include the value of another string variable- the group to which the member belongs- in the title.
So it would look like:
Group X
Member 1
The alternatives I tried so far did not work.
The basic code I am using is this:
levelsof mem_id, local(levels)
foreach l of local levels {
twoway (bar varx week , sort) ylabel(, labsize(vsmall)) ytitle("") xlabel(, labsize(vsmall)) xtitle("") title("Member `l'") legend (off)
graph export "`l'.png", replace
}
Any suggestions on how to do this?
Thank you very much.
Laura
I am trying to create graphs that loop over a variable (mem_id ). But I would also like to include the value of another string variable- the group to which the member belongs- in the title.
So it would look like:
Group X
Member 1
The alternatives I tried so far did not work.
The basic code I am using is this:
levelsof mem_id, local(levels)
foreach l of local levels {
twoway (bar varx week , sort) ylabel(, labsize(vsmall)) ytitle("") xlabel(, labsize(vsmall)) xtitle("") title("Member `l'") legend (off)
graph export "`l'.png", replace
}
Any suggestions on how to do this?
Thank you very much.
Laura
Comment