Re: Clever Tricky Solutions
- To: mathgroup at smc.vnet.net
- Subject: [mg94177] Re: Clever Tricky Solutions
- From: congruentialuminaire at yahoo.com
- Date: Sat, 6 Dec 2008 06:17:17 -0500 (EST)
- References: <27271771.1228394784179.JavaMail.root@m02> <ghavpg$o9j$1@smc.vnet.net>
Hello Donald & David:
I am also very interested in this type of software problem, because it
seems to be a small obscure issue which will serve as a high barrier
to adoption in many organizations [as Barry rightly states].
I was thinking that maybe this is just a bug which Mathematica V6 introduced
and which the PlotRange -> All specification "fixes". Indeed when I
ran this on a V5.2 system, both graphs show as coded by Donald. I wish
a WRI team member [coder or tester] would look into this and get back
to all of us about:
- is this a bug? Is it "fixed" in V7?
- did the PlotRange default value [when unspecified] become different
in V6, necessitating the need for this "fix" provided by David and
Bobby?
I am also interested in how David "figured out" what the problem is. I
have had many of these situations over the years [several fixed by
members of this group]. And there have been times when I could not
make heads-or-tails of the problem or the fix.
Sometimes I find out weeks or months later while reading some of
Trott's stuff or the like.
So David, if there is a simply explainable answer, can you tell me:
how can I figure out that the PlotRange is the problem [in this case]?
Can I tell by looking at the internal structure of px1 or px2 [like
Trott teaches]? I did notice that only the first one shows. After that
I have no idea.
Thanks in advance...
Regards,
Roger Williams
Franklin Laboratory
On Dec 5, 2:29 am, "David Park" <djmp... at comcast.net> wrote:
> The following works:
>
> px1 = Plot[1/2 Sin[3.14 x], {x, 1, 2}, AxesOrigin -> {0, 0}];
> px2 = Plot[Sin[3.14 x], {x, 0, 1}, AxesOrigin -> {0, 0}];
> Show[px1, px2, PlotRange -> All]
>
> The problems is that the Show statement picks up options from the first p=
lot
> and uses that, even though the second plot would suggest that something
> different is needed.
>
> <snipped/>