I'm recasting a v19 Wishlist request to a General forum posting of questions.
Yesterday on the Wishlist I posted this https://www.statalist.org/forums/for...92#post1769092:
Maarten Buis helpfully provided a solution:
My questions:
1. Is the use of compound quotes to create multi-line axis labels documented anywhere? I was unable to find such documentation.
2. In the final part of my Wishlist posting why would the two different labels
a) "Mean=" "21.3"
and
b) "L1" "L2"
result in different behavior regarding generation of an error message?
3. I tried Maarten's compound quote approach to generate multi-line titles and axis titles and in those cases it does not work.
Thanks in advance for any insights.
Yesterday on the Wishlist I posted this https://www.statalist.org/forums/for...92#post1769092:
Stata's -twoway- graphs easily handle multi-line titles, axis titles, etc. e.g.
It would sometimes be handy if axis labels could be shown in multiple lines but current capabilities don't allow this (unless I've missed something).
For instance, I might want to show something like
but that does not work.
Curiously that xlab specification produces gibberish but does not generate an error but this one does
Code:
scatter price mpg, t1("This is the t1 Title" "Shown in" "Three Lines")
Code:
scatter price mpg, xti("This is the x-axis Title" "Shown in Two Lines")
For instance, I might want to show something like
Code:
scatter price mpg, xlab(10 21.3 "Mean=" "21.3" 40)
Curiously that xlab specification produces gibberish but does not generate an error but this one does
Code:
. scatter price mpg, xlab(10 21.3 "L1" "L2" 40) invalid label specifier, : 10 21.3 "L1" "L2" 40: r(198);
Maarten Buis helpfully provided a solution:
The label needs to be surrounded by compound quotes:
Code:
scatter price mpg, xlab(10 21.3 `""Mean=" "21.3""' 40)
My questions:
1. Is the use of compound quotes to create multi-line axis labels documented anywhere? I was unable to find such documentation.
2. In the final part of my Wishlist posting why would the two different labels
a) "Mean=" "21.3"
and
b) "L1" "L2"
result in different behavior regarding generation of an error message?
3. I tried Maarten's compound quote approach to generate multi-line titles and axis titles and in those cases it does not work.
Thanks in advance for any insights.