Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Nick Cox <njcoxstata@gmail.com> |
To | "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |
Subject | forcing omission of data on graphs [was: Re: st: RE: RE: Features for Stata 14} |
Date | Tue, 10 Sep 2013 11:34:07 +0100 |
Interesting point. If there were graph suboptions -xsc(r() force)- and -ysc(r() force)- then a user could pass those to your program. That might sound easy enough in principle, but I wouldn't want to be the person implementing it. For example, suppose you are connecting data points on some graph and there is a data point beyond your limits. What should happen to the connection? Should it be drawn to the edge of the graph? My guess is that this was the sort of issue behind the present choice. The logic of insisting on -if- (and/or -in-) is that you are stipulating which data are to be shown in drawing the graph, not drawing a graph and then trimming it. Nick njcoxstata@gmail.com On 10 September 2013 09:12, Schaffer, Mark E <M.E.Schaffer@hw.ac.uk> wrote: > I've been bitten by #6 too, most recently in writing -weakiv-. This is a program that calls Stata's graph commands. There's an option which lets users pass additional options to the graph command, which works for everything ... except limiting the range of data axes. If the user wants to do that, it has to be passed in a separate option and fed to the graph command using -if-. It's only an annoyance in this case, but it is a bit annoying. Nick Cox >> Standard Stata logic is that you can do this easily: you just need to exclude data >> with an -if- condition. That's force, it's explicit as what you've done; how is it >> deficient? On 10 September 2013 03:55, Timothy Mak <tshmak@hku.hk> wrote: >> > 6. Allow users to over-ride data-dependent axis limits. Currently, we cannot >> force the axes to have a smaller range than the actual data range. But surely if >> people want such a graph, it should be possible. A warning message may be all >> that is necessary. >> * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/