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

Re: st: [Stata 9] scatter axis bug

From   [email protected] (Vince Wiggins, StataCorp)
To   [email protected]
Subject   Re: st: [Stata 9] scatter axis bug
Date   Wed, 04 May 2005 17:22:07 -0500

David Airey <[email protected]> notes that the range of axis values
from -graph twoway- exhibits "weird behavior" when one of the variables
forming a plot has a missing value where the other has a very large or small
value.  The range of the axis includes this large or small value, even though
the point is not plotted (because its associated ordinate or abscissa is

This is in fact an intended feature, though admittedly one with mixed appeal.
Unlike -plot- or -graph- prior to Stata 8, -graph twoway- does not simply
throw away all observations that have a missing value for any of the variables
being plotted.  Instead, it tracks these missing values and allows you to
either connect lines across the gaps or leave breaks in lines where missing
values occur (see the option -cmissing()-).  -graph twoway- also allows you to
specify multiple plots that might use different variables for the X- and
Y-values and those plots might involve 2, 3 or even only 1 variable.  While
you might occasionally be surprised by the range of a simple graph, we the
most consistent results would be produced by using the full range of specified

We were also comfortable with the fact that you can use an -if- qualifier to
explicitly exclude observations, though Scott Merryman's <[email protected]>
suggestion to use the -missing()- function is more direct than anything I had

-- Vince 
   [email protected]

*   For searches and help try:

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