Good morning to everybody!!!
How to change the order of the variable in spineplot?
By default it gives them in alphabetical order. Below the code I used but it gives me error thanks in advance to everybody spineplot preference group, legend(size(tiny)) xtitle("") xlabel("") /// percent ylab(0(10)100, labsize(tiny) axis(2)) ytitle("", axis(2)) /// xlab(, labsize(vsmall) axis(2)) xtitle("", axis(2)) name(third, replace) /// bar1(bcolor(cyan)) bar2(bcolor(mint)) /// bar3(bcolor(lime)) bar4(bcolor(midgreen)) bar5(bcolor(dkgreen)) /// bar6(bcolor(red)) bar7(bcolor(orange)) bar8(bcolor(yellow)) /// bar9(bcolor(pink)) bar10(bcolor(cranberry)) bar11(bcolor(purple)) ylab(1 "Adult satisfied" 2 "Life skills training" 3 "Support group, on-line" 4 "Support groups, in person" 5 "Free time activities" 6 "Family relations support and counseling" 7 "Behavior training, for an individual" 8 "Behavior training in groups" 9 "Program for matching autistic peers with each other" 10 "Program for matching an autistic person with a non-autistic peer" 11 "Other")
How to change the order of the variable in spineplot?
By default it gives them in alphabetical order. Below the code I used but it gives me error thanks in advance to everybody spineplot preference group, legend(size(tiny)) xtitle("") xlabel("") /// percent ylab(0(10)100, labsize(tiny) axis(2)) ytitle("", axis(2)) /// xlab(, labsize(vsmall) axis(2)) xtitle("", axis(2)) name(third, replace) /// bar1(bcolor(cyan)) bar2(bcolor(mint)) /// bar3(bcolor(lime)) bar4(bcolor(midgreen)) bar5(bcolor(dkgreen)) /// bar6(bcolor(red)) bar7(bcolor(orange)) bar8(bcolor(yellow)) /// bar9(bcolor(pink)) bar10(bcolor(cranberry)) bar11(bcolor(purple)) ylab(1 "Adult satisfied" 2 "Life skills training" 3 "Support group, on-line" 4 "Support groups, in person" 5 "Free time activities" 6 "Family relations support and counseling" 7 "Behavior training, for an individual" 8 "Behavior training in groups" 9 "Program for matching autistic peers with each other" 10 "Program for matching an autistic person with a non-autistic peer" 11 "Other")
Comment