I am trying to make a two-way histogram. Unfortunately, the text and the 'box' in the legend are not exactly aligned. To see the issue, consider the example:
This produces the following histogram:

As can be seen, "MPG Variable" is not aligned with the green box: it is a bit too low. An analogous comment applies to "REP78 Variable". Is there an easy way to fix this?
Note: I tried posting this question earlier (see here) but couldn't see it listed in the forum. I'm reposting from a different browser.
Code:
sysuse auto.dta twoway (histogram mpg, discrete bfcolor(white) bcolor(black*.60)) /// (histogram rep78, discrete color(green%20)), /// legend(order(2 "MPG Variable" 1 "REP78 Variable")) xsc(titlegap(*5)) plotregion(margin(zero))
As can be seen, "MPG Variable" is not aligned with the green box: it is a bit too low. An analogous comment applies to "REP78 Variable". Is there an easy way to fix this?
Note: I tried posting this question earlier (see here) but couldn't see it listed in the forum. I'm reposting from a different browser.
Comment