Hi
I am going to put an order in this catplot, but it does not work. I mean, I need the graph appears in this order: first: 4 years & less, second: 6 years, third:9 years, forth:12 years, lastly: university.
Could anyone please have a look at the codes?
I am going to put an order in this catplot, but it does not work. I mean, I need the graph appears in this order: first: 4 years & less, second: 6 years, third:9 years, forth:12 years, lastly: university.
Could anyone please have a look at the codes?
Code:
* Example generated by -dataex-. For more info, type help dataex clear input int ANO str14 Schooling 2010 "6 Years" 2010 "12 Years" 2010 "6 Years" 2010 "9 Years" 2010 "9 Years" 2010 "University" 2010 "6 Years" 2010 "9 Years" 2010 "6 Years" 2010 "4 Years & Less" 2010 "9 Years" 2010 "12 Years" 2010 "9 Years" 2010 "9 Years" 2010 "9 Years" 2010 "12 Years" 2010 "9 Years" 2010 "9 Years" 2010 "12 Years" 2010 "9 Years" 2011 "12 Years" 2011 "12 Years" 2011 "9 Years" 2011 "9 Years" 2011 "12 Years" 2011 "University" 2011 "9 Years" 2011 "12 Years" 2011 "9 Years" 2011 "9 Years" 2011 "12 Years" 2011 "12 Years" 2011 "12 Years" 2011 "12 Years" 2011 "9 Years" 2011 "6 Years" 2011 "University" 2011 "12 Years" 2011 "University" 2011 "University" 2012 "4 Years & Less" 2012 "4 Years & Less" 2012 "4 Years & Less" 2012 "9 Years" 2012 "4 Years & Less" 2012 "9 Years" 2012 "9 Years" 2012 "12 Years" 2012 "6 Years" 2012 "4 Years & Less" 2012 "4 Years & Less" 2012 "9 Years" 2012 "12 Years" 2012 "6 Years" 2012 "University" 2012 "University" 2012 "4 Years & Less" 2012 "University" 2012 "12 Years" 2012 "13 Years" 2012 "14 Years" end catplot Schooling ANO, percent(ANO) asyvars stack recast(bar) /// legend(order(4 years & less 6 years 9 years 12 years university )row(1) pos(6) size(small)) bar(1, fcolor(red*0.6) lcolor(red)) /// bar(2, fcolor(red*0.2) lcolor(red)) bar(3, fcolor(blue*0.2) lcolor(blue)) /// bar(4, fcolor(blue*0.6) lcolor(blue)) bar(5, fcolor(blue)) name(G2, replace) subtitle(% by ANO, place(w))

Comment