The following mwe shows what works and what doesn't:
Code:
sysuse auto, clear local titles "Domestic" "Foreign" local n_titles: word count `titles' * This works: the words are shown forvalues i=1/2{ local x: word `i' of `titles' display "`x'" } * This does not work: parentheses do not balance forvalues i=1/2{ local x: word `i' of `titles' graph bar (median) price if foreign==`i'-1, title("`x'") over(make, label(nolabel)) }
Thanks in advance,
Vinicius
0 Response to Problem with local macro in a graph title
Post a Comment