Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

In Derive 6, if I plot $1 - x^2 - y^2 $, I get this:

However in Mathematica 8 I get this:

I'm using Plot3D[1 - x^2 - y^2,{x,-5,5},{y,-5,5}]

What should I do in Mathematica in order to get Derive's result?

share|improve this question
    
Look up PlotRange and BoxRatios in the documentation. You need to add PlotRange -> {-5, 5} and BoxRatios -> 1 to your plotting command. –  rm -rf Nov 4 '12 at 21:38
    
Thank you! It worked as expected. –  Lance Remaley Nov 4 '12 at 21:51
    
Welcome to Mathematica.SE! Please consider registering your account so that any upvotes you get on this question are added to those you might get on future questions and answers. That way, over time you will be able to do more on the site (post graphics, edit things, etc). –  Sjoerd C. de Vries Nov 4 '12 at 22:00
    
@Lance Remaley: Are you "graduating" from Derive to Mathematica? Derive was very good in its heyday, but a CAS such as Mathematica that runs on all major platforms has an ultimate edge over a CAS such as Derive that does not. –  murray Nov 5 '12 at 14:21
    
@murray: I had to do the plot, so I went to Mathematica, but I found that the result wasn't what I expected. In order to show what my expectations were so you could help to figure out what I was doing wrong, I did the plot in Derive, but I'm not a Derive user, I just watched some plot tutorial on YouTube and one of them was done in Derive and looked the way I wanted to look. –  Lance Remaley Nov 5 '12 at 16:07

2 Answers 2

up vote 13 down vote accepted

For starters, you need to fix the PlotRange. Derive clips all axes between -5 and 5, whereas Mathematica chooses the "most interesting" range by default, which in this case was the entire range of $z$ coordinates. This should "fix" the obvious difference between the two plots.

To further bring your Mathematica output closer to Derive's, you'll have to customize it using the different options for Plot. You should read the documentation to familiarize yourself with the syntax and uses for each of them, but here's something for you to start on:

Plot3D[1 - x^2 - y^2, {x, -5, 5}, {y, -5, 5},
    PlotRange -> {-5, 5},
    BoxRatios -> 1,
    ColorFunction -> (Blend[{Blue, Cyan, Green}, #3] &),
    Mesh -> 40,
    PlotPoints -> 50,
    ClippingStyle -> None
]

share|improve this answer
4  
+1 Congrats on 30k ! –  Artes Nov 4 '12 at 21:53
1  
Yay \o/! Thanks @Artes :) –  rm -rf Nov 4 '12 at 21:54
1  
Indeed, clap clap –  Sjoerd C. de Vries Nov 4 '12 at 21:58

Here's how Mathematica plots it simply by adjusting the PlotRange:

Plot3D[1 - x^2 - y^2, {x, -5, 5}, {y, -5, 5}, PlotRange -> {-10, 10}, 
BoxRatios -> Automatic]

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.