Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Mathematica Problems

  1. Aug 3, 2006 #1
    I have searched the Mathematica bible long and hard and done various searches in the help index of Mathematica but have found nowhere instructions on how to solve my problem.

    For a 2D, or in my case 3D plot, you choose the x and y axes easily by setting them in the initial command to plot your function, but there does not seem to be anyway to choose the z axis limits? I am reasonably confident Mathematica is chopping off most of my function and I want to extend the z axis up to higher limits to observe the full plot. Has anyone else experienced this problem?
  2. jcsd
  3. Aug 3, 2006 #2
    What you are probebly looking for is the PlotRange option. You should use it like this:

    Code (Text):
    Also becouse the default setting of PlotRange is Automatic and it usualy work preaty well, it might be a good idea to reconsieder your x and y renges (make them smaller if you don't REALLY need them that big).

    Hope this helped.

    PS: This thread might be more sutible for the Computers/Programming forum.
    Last edited: Aug 3, 2006
  4. Aug 3, 2006 #3
    Well, I could be wrong, but in the case of the 2D case all you do is use the tag PlotRange->{min,max} as an option. So for 3D I would use the same option and change the PlotRange.

    It would look something like:
    Plot3D[function, {x,xmin,xmax}, {y,ymin,ymax}, PlotRange->{zmin,zmax}]

    Give it a try. There is also a listserve for Mathematica. Send a message asking to be added to it at: mathgroup@smc.vnet.net

    Let me know if that works or not.
  5. Aug 3, 2006 #4
    Seems LENIN is quicker than I.

    Well, it seems LENIN and I agree atleast. So it should work.
  6. Aug 3, 2006 #5
    Thank-you, this was very helpful and correcetd my problem. I can't fathom why Mathematica insisted on plotting just bizarre z-axes by default but I have now a nice plot of the correct function.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook