Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: legend of -graph pie-


From   UENOHARA Hideaki <uhideaki@td6.so-net.ne.jp>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: legend of -graph pie-
Date   Sat, 01 Nov 2003 15:30:11 +0900

Dear Vince and all.

I appreciate Stata Corp.'s prompt action, but I'm afraid the peculiar
behavior of -graph pie- still remains. It still includes unintended keys
in the legend. Of course I recognized that the latest executable and
ado-files (31 Oct 2003) are installed in my computer.

With the following commands, can anybody replicate this behavior?

. sysuse auto
. graph pie, over(rep78) by(foreign)

H.U.


On Fri, 31 Oct 2003 10:37:16 -0600
vwiggins@stata.com (Vince Wiggins, StataCorp) wrote:

> UENOHARA Hideaki <uhideaki@td6.so-net.ne.jp> notes that -graph pie- includes a
> key in the legend for missing values when the -over()- and -by()- options are
> combined and the over group variable has missing values
> 
> > After updating the executable and ado-files, I have found -graph
> > pie- behaves peculiarly with respect to the legend.
> >
> > The problem is as follows:
> >
> > . sysuse auto.dta
> > . graph pie, over(rep78) by(foreign)
> >
> > produces a pie chart whose legend has an extra key which corresponds
> > to missing values. On the other hand
> >
> > . graph pie, over(rep78)
> >
> > does not.
> 
> Friedrich Huebler <huebler@rocketmail.com> notes that this behavior extends to
> including keys for groups excluded with an -if- condition and also suggests
> that we can use -legend(order(...))- to exclude any keys we wish.
> 
> This behavior is an unintended consequence of the fact that -by()- tries to be
> completely generic and have no knowledge of the -graph- subcommand being
> -by-ed, while at the same time allowing a common legend with a single set of
> keys to be produced.  Suffice to say that we cannot get rid of those extra
> keys without making -by()- smarter about which graph subcommand is being run.
> That intelligence will be added in the next official update, either late this
> afternoon or Monday.  Keys for unwanted missings and explicitly excluded
> groups will no longer haunt our legends.
> 
> 
> -- Vince
>    vwiggins@stata.com
> 
> *
> *   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/
> 

Yours Sincerely,
UENOHARA Hideaki
uhideaki@td6.so-net.ne.jp


*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index