MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Clever Tricky Solutions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg94319] Re: Clever Tricky Solutions
  • From: David Bailey <dave at removedbailey.co.uk>
  • Date: Wed, 10 Dec 2008 04:48:16 -0500 (EST)
  • References: <27271771.1228394784179.JavaMail.root@m02> <ghavpg$o9j$1@smc.vnet.net> <ghdmvt$frc$1@smc.vnet.net> <ghf70d$pdu$1@smc.vnet.net> <ghj02i$ffs$1@smc.vnet.net> <ghlmd8$jv7$1@smc.vnet.net>

Helen Read wrote:
> David Bailey wrote:
>> Helen Read wrote:
>>> This was discussed here at length when v6 came out last year. WRI 
>>> changed the default behavior of Show beginning with 6.0, because, 
>>> according to them, with the various new graphics options (Filling, etc.) 
>>> introduced in v6, it "often" does not make sense to combine the 
>>> PlotRanges of the individual graphics. So instead, Show now uses the 
>>> PlotRange from the first graphic by default. 
> 
> [snippage]
> 
> 
>>> I greatly dislike this behavior, as I virtually *never* want the 
>>> PlotRange from the first plot. Rather, I want the PlotRanges combined 
>>> automatically by default, as Show did prior to v6. On the rare occasion 
>>> where I need something else, I can always specify the PlotRange 
>>> explicitly. [...]
> 
> 
>> I agree something like this should be built in to Mathematica, but in 
>> the meantime, how about defining a little function such as:
>>
>> showAll[pl_List,opts___Rule]:=Module[{plRanges,x1,x2,y1,y2},
>>      plRanges=Map[AbsoluteOptions[#,PlotRange]&,pl];
>>      x1=Min@plRanges[[All,1,2,1,1]];
>>      x2=Max@plRanges[[All,1,2,1,2]];
>>      y1=Min@plRanges[[All,1,2,2,1]];
>>      y2=Max@plRanges[[All,1,2,2,2]];
>>      Show[pl,PlotRange->{{x1,x2},{y1,y2}},opts]
>> ];
>>
>> showAll[{px1,px2}]
> 
> This would so not be worth it for my Calculus students. 
> Show[{plot1,plot2,plot3},PlotRange->Automatic] is a far simpler thing 
> for them to deal with.
> 
> --
> Helen Read
> University of Vermont
> 
> 
Don't you ask your students to load some code (or arrange for it to load 
automatically) before they start work? You could give them all sorts of 
useful tweaks and extra functions by doing that. One way to load code 
automatically is to create a Configuration/Kernel/init.m file with 
definitions in it, or perhaps just a Get command to load stuff from 
elsewhere.

David Bailey
http://www.dbaileyconsultancy.co.uk


  • Prev by Date: Re: Clever Tricky Solutions
  • Next by Date: Re: RE: A 3D Plot Query
  • Previous by thread: Re: Clever Tricky Solutions
  • Next by thread: Re: Clever Tricky Solutions