This is the same concern raised by Friedrich Huebler in 2013, in this Statalist thread: the categorical axis labels are misaligned in graphs produced via graph dot that have the nofill option specified. Stata Technical Support apparently stated that this was a bug, and it seems to have gone uncorrected from Stata 12 at that time, to Stata 18.5 now.
Here is the original code:
And in Stata 18.5, this is what the second graph (v2) looks like
Two things:
One, I find it very disappointing that this bug has gone unfixed for 11 years!
Second, does anyone have a solution other than the one suggested by Stata at the time, which was to produce separate graphs and then combine them (see Statalist thread linked above) ? In my use case, this would be tedious and non-trivial since I have multiple over() groups in turn embedded within a by() set of groups.
Here is the original code:
Code:
sysuse auto graph dot mpg, over(make, label(labsize(tiny)) sort(mpg)) over(rep78) by(foreign) nofill name(v1) replace foreign = 1 if rep78==1 | rep78==4 graph dot mpg, over(make, label(labsize(tiny)) sort(mpg)) over(rep78) by(foreign) nofill name(v2)
Two things:
One, I find it very disappointing that this bug has gone unfixed for 11 years!
Second, does anyone have a solution other than the one suggested by Stata at the time, which was to produce separate graphs and then combine them (see Statalist thread linked above) ? In my use case, this would be tedious and non-trivial since I have multiple over() groups in turn embedded within a by() set of groups.