Bookmark and Share

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: graph bar multiple-line labels odd behavior when label includes operator


From   dr kardos laszlo <[email protected]>
To   [email protected]
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:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index