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]

Re: st: Pie chart problem


From   vwiggins@stata.com (Vince Wiggins, StataCorp)
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Pie chart problem
Date   Thu, 18 Feb 2010 15:45:04 -0600

Philip Burgess <philip.burgess.uq@gmail.com> has rediscovered a bug when using
option -by()- with -graph pie- and when the number of pie slices differs
across categories.  Actually, the conditions are more specific than just that,
but difficult difficult to explain.  Phillip writes,

> [...] I get the following error message:
>
> plabel[1-2+1].style.ref: class type not found
> r(4018);

I say rediscovered because Nick Cox <n.j.cox@durham.ac.uk> notes that he
previously reported the same bug.  I have found that bug report, will dust it
off, and we will get a fix in a future update.  I admit that I have been
ignoring my weekly reminder to fix that bug for more than a few weeks.  The
fix will not be in the very next update because that box is closed.

I would like to expand on Nick Cox's suggested workaround, 

> As work-around is to spell out separate -plabel()- calls.

I believe Philip's graph will work if he replaces -plabel(_all ...)- with
-plabel(1 ...) plabel(2 ...)  plabel(3 ...)- and so on, until he has
individually specified enough labels for all the pie slices.  He can even
specify -plabel(# ...)- for slices that do not exist.  It is the bookkeeping
for -_all- that fails in the face of varying numbers of slices for by groups
and leads to the ugly, not for public consumption, error message.

-- Vince 
   vwiggins@stata.com

 
*
*   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