Ask Your Question

# Vertical view plot3d

Is there any way to set the vertical view in plot3d? For example I want to plot sqrt(x^2+ y^2). I know how to set the x and y ranges but I only want the z axis to go from say 0 to 3. Zmin and zmax do not seem to do anything.

edit retag close merge delete

## 1 answer

Sort by » oldest newest most voted

Since the surface is determined by the independent variables, you can limit their domains to limit the height of the surface:

var('x y z')
limit = sqrt(9/2)
plot3d(sqrt(x^2+ y^2), (x,-limit,limit), (y,-limit,limit))


Here's a live example.

And if you want to set limits for each variable independently, use implicit_plot3d:

var('x y z')
implicit_plot3d(sqrt(x^2+ y^2)-z, (x,-5,5), (y,-5,5), (z,0,3))


Another live example.

more

## Comments

Thanks for your reply! However, not quite what I'm looking for. Unfortunately I now realize that I was not very clear in my question! Basically I want that figure to look exactly like what it's supposed to look like (i.e., a cone). I can see that the cone is there, but when I'm teaching this stuff to students who have never seen it before, they're going to look at that figure and say "that's not a cone" due to the top "curves". So, I want to actually have the independent variables generate larger values of Z than the values of Z that I show (basically, I want to chop the top part of that view so that it now actually does look like a standard cone). Is there a way to do this?

## Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

## Stats

Asked: 2017-02-10 18:20:49 -0500

Seen: 103 times

Last updated: Feb 11 '17