I’ve been googling around trying to solve an annoying problem using Stata graph bar. In the process, I came across this totally awesome page of user-written graph types.I realize this is appealing only to a certain subset of us.
What I’m trying to do is to control Stata’s graph bar with three over variables. It is an extremely cumbersome little product that will basically do the job with three “over” variables, but has no obvious way to let me fine-tune details like exactly which color to assign to each series of bars, or to be sure that the order of labels in the legend matches up to the order of the bars in the graph if I’ve used the sort option to change the bar order. You can reset the color of each bar individually, but that isn’t what I want to do: I want each series to have the same color and doing this bar by bar is both tedious and error-prone. Stata knows enough to give each series a distinct color, but does not seem to want to let the user choose the color on a series-wise basis. If you happen to be a Stata graph wonk and want to provide some free consulting, do let me know. I’ve already read through the Statalist archives enough to know that other people also find it difficult to do exactly what they want with graph bar. In case you are wondering, the independent variables are categorical and twoway bar does not help at all.
Edit: I decided to jazz this up with a sample. Note that I put number prefixes on the race labels to get them in the same order as the bars. Otherwise Stata would alphabetize them! I could use the legend order command, but there’s a risk that this would not coincide with the actual categories associated with each bar. I’d like to shade the bars so White is light, Black is dark, and the disparity is medium.