Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: st: RE: bug with -noextend- option?


From   philippe van kerm <[email protected]>
To   "[email protected]" <[email protected]>
Subject   RE: st: RE: bug with -noextend- option?
Date   Thu, 4 Feb 2010 14:42:09 +0100

I tend to believe there is some problem there. At the minimum, behaviour is not consistent with what is explained in the manuals (under [G] axis_scale_options) -- at least last time I looked!

Why, for example, do

     twoway scatter price mpg, plotregion(margin(20 20 20 20)) xscale(extend)  yscale(extend)

and

     twoway scatter price mpg, plotregion(margin(20 20 20 20)) xscale(fextend)  yscale(fextend)

produce the same graph? The manual says "If the plot region does have margins, extend would result in the y and x axes not meeting. With fextend they touch."

Similarly,

     twoway scatter price mpg, plotregion(margin(20 20 20 20)) xscale(noextend)  yscale(noextend)

does not return anything I can understand.

I had raised this issue with Tech-Support a while ago (this problem dates back to Stata 9 days).


Philippe




> -----Message d'origine-----
> De : [email protected] [mailto:owner-
> [email protected]] De la part de Fiedler, James (JSC-
> SK)[USRA]
> Envoyé : Tuesday, February 02, 2010 5:53 PM
> À : [email protected]
> Objet : RE: st: RE: bug with -noextend- option?
>
> Thanks.  This could come in handy.  Looking at the region_options help
> file I see that the "correct" way to do what I want is probably
>
> -scatter lexp gnppc, yscale(nofextend) xscale(nofextend)
>
> and use the plotregion(margin()) option for the padding.
>
> James
> ________________________________________
> From: [email protected] [owner-
> [email protected]] On Behalf Of Martin Weiss
> [[email protected]]
> Sent: Tuesday, February 02, 2010 10:47 AM
> To: [email protected]
> Subject: AW: st: RE: bug with -noextend- option?
>
> <>
>
> "(maybe stretch a line between some hidden fake data),"
> " I think I'll try to find a work-around."
>
>
>
> For such "quick and dirty" operations, the -immediate- -twoway-s can be
> handy. Try:
>
>
>
> *************
> tw (pci 2 0 4 0)
> *************
>
>
>
> HTH
> Martin
>
>
> -----Ursprüngliche Nachricht-----
> Von: [email protected]
> [mailto:[email protected]] Im Auftrag von Fiedler,
> James
> (JSC-SK)[USRA]
> Gesendet: Dienstag, 2. Februar 2010 17:40
> An: [email protected]
> Betreff: RE: st: RE: bug with -noextend- option?
>
> Spoke too soon!  I guess it doesn't do what I want.  Thanks for the
> suggestion, though.
>
> I'll find a work-around (maybe stretch a line between some hidden fake
> data), but here's what I'm trying to do: Suppose I want to extend the
> range
> of the graph to give the data a little more, but only want the axis to
> extend from the min to max data values.  With nofextend the line still
> covers the range of the graph, beyond the max and min of the data.
>
> I still don't understand what noextend is doing.  Using noextend with
> some
> data I get lines that don't extend through all labels, and with some
> other
> data it produces an axis line that continues through the inner and
> outer
> graph regions.  Maybe there's a logic to it that I'm missing?  In any
> case,
> as I said, I think I'll try to find a work-around.
>
> James
> ________________________________________
> From: [email protected]
> [[email protected]] On Behalf Of Fiedler, James
> (JSC-SK)[USRA] [[email protected]]
> Sent: Tuesday, February 02, 2010 10:25 AM
> To: [email protected]
> Subject: RE: st: RE: bug with -noextend- option?
>
> Thank you, Scott.  This does what I want.
>
> James
> ________________________________________
> From: [email protected]
> [[email protected]] On Behalf Of Scott Merryman
> [[email protected]]
> Sent: Monday, February 01, 2010 6:45 PM
> To: [email protected]
> Subject: Re: st: RE: bug with -noextend- option?
>
> Try this:
>
> -scatter lexp gnppc, yscale(nofextend) xscale(nofextend)
> ylabel(minmax) xlabel(minmax)-
>
> Scott
>
>
> On Mon, Feb 1, 2010 at 3:07 PM, Fiedler, James (JSC-SK)[USRA]
> <[email protected]> wrote:
> > Hello,
> >
> > Using Stata 11, I think there might be a bug with the -noextend-
> option
> for axis scales.  If I do
> >
> > sysuse lifeexp, clear
> > scatter lexp gnppc, yscale(noextend) xscale(noextend)
> >
> > I get strange looking axis lines.  Specifically, the x-axis line
> extends
> from < 0 to ~3500, y-axis line from ~72 to ~79.   If I read the help
> file
> description correctly, -noextend-  should make the line extend as far
> as the
> axis labels (I am inferring from the description for -extend-).
> Setting
> yscale(range()) or xscale(range()) don't seem to help.
> >
> > Is this a bug, or am I doing something incorrectly?
> >
> > Thanks,
> > James Fiedler
> >
>

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