Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: 3D plot question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg62656] Re: 3D plot question
  • From: Bill Rowe <readnewsciv at earthlink.net>
  • Date: Wed, 30 Nov 2005 00:07:42 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

On 11/29/05 at 4:44 AM, tma at nus.edu.sg (Tun Myint Aung) wrote:

>When I plot a 3D plot in mathematica, I found that some part of the
>surface has been cut off in the graph. For example,

>z = x^5*y

>Plot3D[z, {x, -1, 1}, {y, -1, 1}, PlotPoints -> 40,

>Mesh -> False, BoxRatios -> {1, 1, 0.4}]

>Mathematica plot for z values only in the range -0.2 to 0.2.
>Actually when x=1, y=1, z value will be 1. But in the graph, the
>surface goes flat for z>0.2.Why? How can I get the graph for full
>range of z?

Mathematica has an internal algorithm used in plotting functions that is designed to scale the plot so has to show the most interesting portion of the plot. Obviously, there is no way Mathematica can know what portion of the plot is most interesting to you. So, it should not be surprising what is shown in a plot is clipped or not as expected. What should be suprising is the amount of times Mathematica's algorithm gets it right.

In any case, the solution is to include the option PlotRange->All which causes Mathematica to scale the plot so that all of the values show up.

Note, this aspect of Mathematica can be particularly insidious when using ListPlot. For example, consider the following plot

ListPlot[Join[Table[Random[], {50}], {1000}, Table[Random[], {50}]]];

The existence of the one odd large value is not apparent. Yet such values could be the most important points in a data set.

The problem with using PlotRange->All is illustrated by the following plot

ListPlot[Join[Table[Random[], {50}] + Range@50, {10000}, Table[Random[], {
        50}] + Range@50 + 50], PlotRange -> All];

Here the general linear trend is obscured by forcing Mathmatica to include all of the data.

The point is there is no set of options that can be trusted to always provide a good view of your data.
--
To reply via email subtract one hundred and four


  • Prev by Date: Re: Re: FW: 3D plot question
  • Next by Date: Re: Importing tab-delimited data files?
  • Previous by thread: Re: Re: FW: 3D plot question
  • Next by thread: Re: Bypassing built-in functions in differentiation