# Mathematica Problems

1. Aug 3, 2006

### natski

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. Aug 3, 2006

### LENIN

What you are probebly looking for is the PlotRange option. You should use it like this:

Code (Text):
Plot3D[f(x,y),{x,min_x,max_x},{y,min_y,max_y},PlotRange->{min_z,max_z}]
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
3. Aug 3, 2006

### Norman

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.
Cheers,
Norm

4. Aug 3, 2006

### Norman

Seems LENIN is quicker than I.

Well, it seems LENIN and I agree atleast. So it should work.

5. Aug 3, 2006

### natski

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.