Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: weird "labels.Arrpush" error in -scatter-


From   [email protected] (Vince Wiggins, StataCorp)
To   [email protected]
Subject   Re: st: weird "labels.Arrpush" error in -scatter-
Date   Tue, 14 Feb 2006 13:05:17 -0600

Al Feiveson writes that he cannot draw a graph if the variable label on one of
his plotted variables begins with an equal sign (=).

> Apparently if a variable label starts with "=", -scatter- gives an
> "Arrpush" error. The error only seems to occur if the "=" is the
> first character in the label (see below).
>
> . des b time
>
>               storage  display     value
> variable name   type   format      label      variable label
> ------------------------------------------------------------------------
> b               float  %9.0g                  =EQ/100
> time            float  %9.0g                  raw time (days)
>
> . scatter b time
> labels.Arrpush invalid name
> invalid syntax
> r(198);

This is indeed a bug and we will fix it in a future ado update.  The bug is
subtle, however, and fixing it has many potential side effects that we need to
study carefully.  That is just my way of saying that the bug may not be fixed
in any of then next few updates.

There are two workarounds, and admittedly neither is wholly satisfactory.  The
problem arises because the label is used as the Y-axis title for the graph and
that is how we will work around it.

    1) Give the variable an innocuous label and explicitly specify the desired
       Y-axis title.

       . label var b "something innocuous"
       . scatter b time , title("=EQ/100")

    2) Wrap the label in lots (two sets) of compound quotes, which avoids the
       problem.

       . label var b `"`"`"=EQ/100"'"'"'
       . scatter b time

 
-- Vince
   [email protected]

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index