Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Labels with graph dot nofill option continue to be misaligned

    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:

    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)
    And in Stata 18.5, this is what the second graph (v2) looks like
    Click image for larger version

Name:	Screenshot 2024-09-06 at 11.23.40 AM.png
Views:	2
Size:	973.1 KB
ID:	1763173


    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.
    Attached Files
    Last edited by Hemanshu Kumar; 06 Sep 2024, 00:03.
Working...
X