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 at the end of May, and its replacement, statalist.org 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 <l_kardos@chello.hu>
To   statalist@hsphsun2.harvard.edu
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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index