Stata allows only two over() variables in "graph dot ...". Is there a way to mimic a third over() variable in a graph dot? Below is the code and data I used to create a Cleaveland Dot plot. I want to label "City" and "Village" on the y-axis, on the left, for the group of cities and villages. If that is not possible, I want to have a gap between the group of Cities and Villages so that they seem grouped (group of cities is distinct from group of villages).
graph dot (asis) _50 _90 _100, over(year, label(labsize(small))) over(population, sort(seqcode)) marker(1, msymbol(circle)) marker(2, msymbol(circle_hollow)) marker(3, msymbol(+)) title("Income shares") scheme(s1mono)
data is below:
graph dot (asis) _50 _90 _100, over(year, label(labsize(small))) over(population, sort(seqcode)) marker(1, msymbol(circle)) marker(2, msymbol(circle_hollow)) marker(3, msymbol(+)) title("Income shares") scheme(s1mono)
data is below:
Code:
* Example generated by -dataex-. For more info, type help dataex clear input byte seqCode str7 popgroup str9 population str7 year float(_50 _90 _100) 1 "City" "City 1" "2004-05" 15.47 44.12 40.42 2 "City" "City 2" "2004-05" 21.29 43.25 35.47 3 "City" "City 3" "2004-05" 18.04 45.72 36.24 4 "Village" "Village 1" "2004-05" 15.62 46.15 38.24 5 "Village" "Village 2" "2004-05" 18.89 43.84 37.27 6 "Village" "Village 3" "2004-05" 24.37 46.24 29.39 1 "City" "City 1" "2011-12" 17.43 44.39 38.18 2 "City" "City 2" "2011-12" 17.99 44.08 37.93 3 "City" "City 3" "2011-12" 18.04 43.62 38.34 4 "Village" "Village 1" "2011-12" 14.95 42.89 42.16 5 "Village" "Village 2" "2011-12" 16.33 44.57 39.11 6 "Village" "Village 3" "2011-12" 28.98 47.14 23.88 end label var seqCode "seqCode" label var popgroup "popGroup" label var population "Population" label var year "Year" label var _50 "0_50" label var _90 "50_90" label var _100 "90_100"
Comment