Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: graph bar multiple-line labels odd behavior when label includes operator

From   dr kardos laszlo <>
Subject   st: graph bar multiple-line labels odd behavior when label includes operator
Date   Wed, 16 Nov 2011 03:57:54 +0100

dear listers,

easier to show than to explain, so please consider:

sysuse auto, clear
gr bar (mean) price, over(foreign, relabel(1 `""non-foreign" "cars""' 2 `""foreign" "cars""'))

which works fine. but once you do this:

la def origin 0 `""non-foreign" "cars""', modify

and then retry gr bar... either exactly as above or without the -relabel()- suboption, it will stop with an error message, even though -la def- specified the very same label as -relabel- did.

what i have found so far by trying around is that the error can be triggered by including an arithmetic, logical, or relational operator in the label definition as above, with the exception of ~ and !.

the issue, however, only exists if we define a multiple-line label with double quotes and compound double quotes arranged accordingly, and disappears once we redefine the label again to exclude all operators.

versions 10 to 12 all seem affected (issue been around for years; no search hits though), at least in a 64-bit windows 7 environment i am blessed with here.

surely this is something unintended and will hopefully be resolved in an upcoming update.

regards, laszlo
*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index