Hello,
The variable 'var' in the below dataset has 10 categories for each state. I would like to have a bar (without space) for the value of each of the categories. I have three states in the dataset. On the x-axis, I would like to have all the categories for the first state together, then for the second together, and then for the third. How can I do that? Also, I would like to have a representation where each category is represented by a different color and then I can have a legend of what color represents which category.
Thank you.
The variable 'var' in the below dataset has 10 categories for each state. I would like to have a bar (without space) for the value of each of the categories. I have three states in the dataset. On the x-axis, I would like to have all the categories for the first state together, then for the second together, and then for the third. How can I do that? Also, I would like to have a representation where each category is represented by a different color and then I can have a legend of what color represents which category.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input byte region_01 str6 var float abs_change_CHR 4 "asst" -29.45125 4 "cfuel" -24.19497 4 "cm" -2.3755288 4 "edu" -10.52449 4 "elec" -36.34635 4 "hsg" -24.19317 4 "nutri" -20.38776 4 "sani" -22.772703 4 "satten" -9.763616 4 "wtr" -13.75391 5 "asst" -37.14813 5 "cfuel" -24.682524 5 "cm" -3.596684 5 "edu" -15.092362 5 "elec" -34.890602 5 "hsg" -20.20026 5 "nutri" -22.283747 5 "sani" -23.79097 5 "satten" -31.06312 5 "wtr" -5.031923 7 "asst" -31.052834 7 "cfuel" -33.004265 7 "cm" -3.222605 7 "edu" -18.568455 7 "elec" -20.96565 7 "hsg" -31.243896 7 "nutri" -27.93447 7 "sani" -34.32783 7 "satten" -15.453047 7 "wtr" -18.937517 end label values region_01 reg label def reg 4 "Assam", modify label def reg 5 "Bihar", modify label def reg 7 "Chhattisgarh", modify
Thank you.

Comment