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

Re: st: graph yline() option


From   [email protected] (Vince Wiggins, StataCorp)
To   [email protected]
Subject   Re: st: graph yline() option
Date   Mon, 03 Feb 2003 18:10:46 -0600

Tom Steichen <[email protected]> notes a difference in the behaviour of the
graphics option yline() option under Stata 7 and Stata 8,

> In Stata8...
>
> I added some ylines to a -graph box- using the -yline()- option,
> wherein one of the values specified in -yline()- was slightly
> outside of the range of the data being plotted.
>
> Rather than expanding the y range to include the line in the usual
> graphics region (as Stata 7 does), Stata8 plotted the line in the
> x-axis label area at a location that appeared to be correct had the
> y-axis extended down that far.

This is by design.

Graphics in Stata 7 and before attempted to be parental and guess at what you
meant by an option or specification, with the hope that the result would be
pretty.  In Stata 8 graphics our overriding rule has been to increase
flexibility and let users specify exactly what they want, even though the
result may be ugly.  A large part of the flexibility in the new graphics comes
from not trying to second guess the user, but rather directly render what is
requested.

I can certainly think of cases where I liked -graph- under Stata 7
automatically making and assumption, and that assumption was just what I
wanted (Tom's example might usually fall in that category), but I can think of
other cases where I simply could not get what I wanted because -graph- did
something automatically that thwarted me.

Tom can explicitly expand the range of the y-axis by specifying the option
-yscale(range(# #))-, where either # may be "." to retain the default upper or
lower axis bound.

In designing Stata 8 graphics we considered making a rule that we avoid
reusing any option name when the option did not behave in Stata 8 exactly as
it did in Stata 7.  The problem with that rule is that many of the Stata 7
option names are just too good, and we didn't want to lose them.  We also felt
that it was easier to adapt to an option whose behaviour was sometimes changed
in Stata 8 than to learn a whole new set of options.


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