Re: Re: No Show

*To*: mathgroup at smc.vnet.net*Subject*: [mg89135] Re: [mg89112] Re: No Show*From*: Andrzej Kozlowski <akoz at mimuw.edu.pl>*Date*: Mon, 26 May 2008 06:24:44 -0400 (EDT)*References*: <g1bf08$mcv$1@smc.vnet.net> <200805260529.BAA09868@smc.vnet.net>

On 26 May 2008, at 14:29, Helen Read wrote: > Narasimham wrote: >> Why is the following plot, bot, (with - Sqrt) not Shown along with >> top? >> >> Why is it treated only as a plot skeleton, so no combining is >> possible? >> >> bot = Plot3D[-Sqrt[1 - (x^2 + y^2) ] , {x, -1, 1}, {y, -1, 1}] >> top = Plot3D[+Sqrt[1 - (x^2 + y^2) ] , {x, -1, 1}, {y, -1, 1}] >> Show[top, bot] > > Oh, you are going to get a lot of replies to this. It was discussed at > length when v.6 was first released. Basically, as of v.6, the default > behavior of Show is to get the PlotRange from the first plot listed. > See > what happens if you reverse it. > > Show[bot, top] > > The way to get something more like you are expecting is to set > PlotRange->Automatic within Show. > > bot = Plot3D[-Sqrt[1 - (x^2 + y^2)], {x, -1, 1}, {y, -1, 1}]; > top = Plot3D[+Sqrt[1 - (x^2 + y^2)], {x, -1, 1}, {y, -1, 1}]; > Show[top, bot, PlotRange -> Automatic] > > You might also want to set the BoxRatios. > > bot = Plot3D[-Sqrt[1 - (x^2 + y^2)], {x, -1, 1}, {y, -1, 1}]; > top = Plot3D[+Sqrt[1 - (x^2 + y^2)], {x, -1, 1}, {y, -1, 1}]; > Show[top, bot, PlotRange -> Automatic, BoxRatios -> {1, 1, 1}] > > I greatly dislike this new behavior of Show, for what it's worth. The > folks at WRI argue that because of all the new graphics options (e.g., > Filling), it would not make sense to combine the PlotRange > automatically > (as Show did in previous versions of Mathematica). Personally, I > find it > to be a pain in the neck to have to ask for PlotRange->Automatic > virtually every time I use Show, and my students often forget and get > burned by it. I would much prefer PlotRange->Automatic to be the > default > in Show, and to set my own PlotRange manually on those infrequent > occasions when I need something else. And as for the argument that > setting a PlotRange automatically from the combined plots isn't always > appropriate, why not provide an easy way to tell Show to use the > PlotRange from a particular plot? Something like PlotRange->{1} to get > the PlotRange from the first plot, PlotRange->{2} to get the range > from > the 2nd plot, etc., would do the job when needed, and still allow > PlotRange->Automatic (which for me is almost always what I want) to be > the default. > > I just now discovered, BTW, that > > SetOptions[Show, PlotRange -> Automatic] > > does not even work. It generates an error message claiming that > "PlotRange is not a known option for Show". > > -- > Helen Read > University of Vermont > Show does not have any options (and has never had any): In[2]:= Options[Show] Out[2]= {} Show only passes options to Graphics, Graphics3D etc. So, you could try: SetOptions[Graphics3D, PlotRange -> All] but this will not work also, because the option setting will only be applied to objects directly created using the Graphics3D command and not to objects created by combaining objects created Plot3D by menas of Show. The following, however, will work: SetOptions[Plot3D, PlotRange -> All] since now Plot3D will pass the option value All to Graphics3D. (However, this may not be the ideal PlotRange setting in some situations). Andrzej Kozlowski

**References**:**Re: No Show***From:*Helen Read <hpr@together.net>