Hello All,
I thank you very much for taking time to read my question.
I am trying to get different colors for different groups in catplot
My example data set is as follows
QUESTION : Is it possible to change color of all bars to black when BEF_AFT==0 and to red when BEF_AFTE==1
Thank you again for your time
Sincerely ,
Anwar Dudekula
I thank you very much for taking time to read my question.
I am trying to get different colors for different groups in catplot
My example data set is as follows
Code:
clear input str106 CCSPRINCIPALDIAGNOSIS int NO float(BEF_AFTER n) "Abdominal pain" 275 0 1 "Abdominal pain" 262 1 1 "Complication of device; implant or graft" 24 1 1 "Complications of surgical procedures or medical care" 21 1 1 "Diabetes mellitus with complications" 323 0 1 "Diabetes mellitus with complications" 305 1 1 "Diabetes mellitus without complication" 44 0 1 "Diabetes mellitus without complication" 30 1 1 "Epilepsy; convulsions" 26 1 1 "Fluid and electrolyte disorders" 57 0 1 "Fluid and electrolyte disorders" 41 1 1 "Gastritis and duodenitis" 22 0 1 end expand NO catplot BEF_AFTER CCSPRINCIPALDIAGNOSIS , ylabel(, nogrid) var1opts(sort(1) descending) bar(1, color(black))
Thank you again for your time
Sincerely ,
Anwar Dudekula
Comment