I am using graph twoway scatter
and adding my own ylabels
.
I often have long labels and break them over multiple lines. However, I encounter a problem when I want to break some labels over two lines, but not others.
When I do this, the single-line labels are off-center relative to their tick
marks, as if Stata expected them to also have two lines.
See below for a simple illustration:
sysuse auto, clear
/* This graph has one long label and one short but both are off-center
relative to their tick marks */
twoway scatter length weight, ytitle("") ylabel(220 ///
`" "This one is a very long" "label, broken up" "' 140 "This one is not", ///
ang(horizontal))
/* The order of labels on the graph *does not* appear to matter */
twoway scatter length weight, ytitle("") ylabel(180 ///
`" "This one is a very long" "label, broken up" "' 220 "This one is not", ///
ang(horizontal))
/* But the order in the command *does* appear to matter */
twoway scatter length weight, ytitle("") ylabel(220 ///
"This one is not" 140 `" "This one is a very long" "label, broken up" "', ///
ang(horizontal))
This is not a huge problem, but one I have noticed for years and knowing why my graphs behave this way would be nice.