I wanna replicate Figure 1 of this paper.
My overlays these respective histograms, but of course in the paper the bars for the groups are side by side. gr bar has the over option, which does this very nicely, but the histogram command lacks this. Is there a workaround for this? I know it isn't the end of the world, since I can just use by, but I was curious if there was a way to do this here.
Code:
* Example generated by -dataex-. For more info, type help dataex clear input float WAGE_ST byte STATE . 0 . 0 . 0 5 0 5.5 0 5 0 5 0 5 0 5.25 0 5 0 5 0 5 0 5 0 5.5 0 5 0 5.25 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 4.25 0 4.25 0 4.25 0 4.25 0 4.5 0 4.25 0 4.5 0 4.25 0 4.5 0 4.25 0 4.67 0 4.75 0 4.25 0 4.25 0 4.75 0 4.25 0 4.5 0 4.25 0 4.25 0 4.25 0 4.25 0 4.25 0 4.25 0 4.25 0 4.25 0 4.5 0 4.75 0 4.87 0 4.75 0 4.5 0 4.25 0 4.75 0 4.25 0 4.25 0 4.75 0 4.5 0 4.25 0 4.25 0 4.5 0 4.5 0 4.5 0 4.5 0 4.5 0 4.75 0 4.25 0 4.75 0 4.25 0 4.75 0 4.5 0 4.75 0 4.25 0 4.35 0 . 1 . 1 . 1 . 1 . 1 . 1 . 1 . 1 . 1 . 1 . 1 . 1 . 1 . 1 . 1 . 1 . 1 5 1 5.12 1 5.56 1 5 1 end twoway histogram WAGE_ST if STATE ==1, percent bcolor(red*0.5) || histogram WAGE_ST if STATE == 0, percent /// legend(order(1 "NJ" 2 "PA")) bcolor(blue*0.5)
Comment