I need some help with the chart below:
- how can I avoid that there is a space for the missing category? ( the data below is only showing a 3x3 matrix, but I have also 10x10 and the graph looks weird)
- How should I rearrange my data to show the two bars of the same color for a single bank next to each other?
- How can I display the legend on top of each bar?
Thanks

- how can I avoid that there is a space for the missing category? ( the data below is only showing a 3x3 matrix, but I have also 10x10 and the graph looks weird)
- How should I rearrange my data to show the two bars of the same color for a single bank next to each other?
- How can I display the legend on top of each bar?
Thanks
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float date str6 a double(BNP CA SOCGEN) str6 date2 20164 "BNP" . .586713291 .595155179 "2015/3" 22015 "BNP" . .650374872 .670668198 "2020/4" 20164 "CA" .618743833 . .55202926 "2015/3" 22015 "CA" .542818524 . .534340881 "2020/4" 20164 "SOCGEN" .751988722 .661390955 . "2015/3" 22015 "SOCGEN" .677377044 .646621673 . "2020/4" end format %tdnn/dd/YY date
Code:
ds date a date2, not graph bar (asis) `r(varlist)', over (date2) over(a) graphregion(margin(zero)) graphregion(color(white)) yti(COPOD) nodraw note("NOTE: Each bar is the conditional probability of the bank given the bank indicated in the legend")
Comment