0
|
4632 Views
|
2 Replies
|
1 Total Likes
View groups...
Share
GROUPS:

# Need help getting Plot to work on the standard equation for a circle

Posted 11 years ago
 f[x_, y_] := x^2 + y^2 == 25Plot[f[x, y], {x, -20, 20}, {y, -20, 20}, AxesLabel -> {x, y}]Plot::nonopt: Options expected (instead of {y,-20,20}) beyond position 2 in Plot[f[x,y],{x,-20,20},{y,-20,20},AxesLabel->{x,y}]. An option must be a rule or a list of rules. >>Ideally, after getting Plot to work, I would like to hand the same function to RevolutionPlot3D to generate a sphere.Thanks.
2 Replies
Sort By:
Posted 11 years ago
 You need to use ContourPlot to plot curves given in implicit form.i.e.ContourPlot[x^2 + y^2 == 25, {x, -20, 20}, {y, -20, 20}, Axes -> True,  AxesLabel -> {x, y}]
Posted 11 years ago
 Plot would work if you solve for y to make the function depend on just x.Note that Plot wants single-valued functions, so to get the top and bottom halves the two solutions are both given. Plot[{Sqrt[25 - x^2], -Sqrt[25 - x^2]}, {x, -20, 20}, AxesLabel -> {x, y}, AspectRatio -> Automatic]