Is there a generic graph subcommand that will get me there, or are the only solutions munging the dataset or manually fiddling with the legend?
Code:
set obs 500 gen fine = runiformint(1,50) gen interesting = mod(fine,5) == 0 gen coarse = runiformint(1,4) drop if interesting & coarse == 3 // Bear with me and pretend the data looks like this graph hbar (count) if interesting, over(coarse) over(fine) asyvars name(g1) graph hbar (count) if interesting, over(coarse) over(fine) asyvars allcategories name(g2) graph combine g1 g2
As you can see, the allcategories subcommand operates on both the coarse variable (good!) and the fine variable (bad!).
0 Response to Including all values for only one over() variable in a bar chart
Post a Comment