Let me put my question simply. I want to combine two bar plots, one of them have a split and multiline x-axis labels. In the resulting graph, this two bar plots have different zero starting heights. So, is there anyway to make them starting at the same horizontal line? Thank you.
Note: In the following code, I use -splitvallabels- command written by Nicholas Winter & Ben Jann from SSC.
Code:
sysuse lifeexp xtile gngroup=gnppc, n(5) label define gngroup 1 "this is a long label" 2 "this label is long" 3 "this long label" 4 "long label it is" 5 "long labels too" label values gngroup gngroup splitvallabels gngroup, length(4) local(gngroup) nobreak graph bar lexp, over(region) name(g1) graph bar lexp, over(gngroup, relabel(`gngroup')) name(g2) graph combine g1 g2, ycommon
0 Response to Graph combine bar plots and make them in same horizontal line
Post a Comment