Re: Part 2 of a recent post on Plot and v 5

*To*: mathgroup at smc.vnet.net*Subject*: [mg44410] Re: [mg44358] Part 2 of a recent post on Plot and v 5*From*: Andrzej Kozlowski <akoz at mimuw.edu.pl>*Date*: Sat, 8 Nov 2003 04:50:52 -0500 (EST)*References*: <200311071016.FAA05351@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

On 7 Nov 2003, at 19:16, Mariusz Jankowski wrote: > Dear colleagues, I recently posted a question about the apparent > change to Plot in version 5. I gather from the responses (thank you) > that this new feature seemed natural or even desirable. That surprised > me, so let me explain. > > I used > > Plot[UnitStep[x], {x, -1, 5}]; > > and found that Mathematica chose to display the function in the "more > interesting" range of -1<=x<=1. > > My opinion is that an EXPLICITLY given range in any of the graphics > commands should not be overridden, under any circumstances. Is there > anyone who agrees with me? I would love to hear some of the opinions > for and against, especially the former, because I can't think of any. > > Finally, if this indeed is a new feature, can anyone explain the > algorithm that is used to choose the "interesting" interval and is it > used in any other 2D graphic functions, and density or contour plots? > > Thanks, Mariusz > > > I am not sure if there has been any change in Mathematica in this respect, or at least any change in the principle that without a specific Range setting Mathematica itself chooses the most suitable or "interesting range". This principle, I think, is very well justified. The point is that very often you simply do not know what range to choose. Particularly when you are plotting functions with singularities, because of the necessary scaling, you may end up with totally incomprehensible graph, a mass of indistinguishable points. To find a suitable range by trial and error could be pretty difficult and time consuming. Mathematica performs a statistical analysis which usually will produce an informative looking graph. It it much easier then to choose a suitable range with a specific PlotRange setting. It is wrong to think that the choice of Range Mathematica makes is just a matter of aesthetics: often it is essential to making any sense of the graph at all. The range you specify in the Plot command (without the Range option) should be considered only as giving upper bounds for the plot within which you are asking Mathematica to find the most informative range of values. If you already know this range of values you should add a Range specification. This seems reasonable to me. Of course one could make the PlotRange->All the default, but actually I think the situation when someone doesn't really know the exact range he needs are more common than the other type. Moreover, as I already mentioned, the PlotRange->All setting can produce graphs that would lead to such a misleading impression of the nature of the function that the user would not even consider trying other alternatives. Andrzej Kozlowski Yokohama, Japan http://www.mimuw.edu.pl/~akoz/

**References**:**Part 2 of a recent post on Plot and v 5***From:*Mariusz Jankowski<mjankowski@usm.maine.edu>