Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Misaligned labels in dot chart
From
Friedrich Huebler <[email protected]>
To
[email protected]
Subject
st: Misaligned labels in dot chart
Date
Fri, 29 Nov 2013 13:00:43 -0500
I use Stata 12.1 and encountered a problem with misaligned labels in a
dot chart. The problem can be demonstrated with the example below.
. 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)
In the second graph, some of the labels are not aligned with the lines
that they represent, for example "Cad. Eldorado" on the top left and
"Pont. Firebird" on the top right. The problem appears to be related
to the gaps in rep78 (between 3 and 5 on the left side and between 1
and 3 on the right side) because without such gaps all labels are
properly aligned (see first graph).
How can I create a graph with properly aligned labels?
Thanks,
Friedrich
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/