Plot a perfect looking circle using two functions, always look like an ellipse [duplicate]

This question already has an answer here:

I want to use the the following two functions to plot a perfect looking circle, but the graph always ends up looking a bit squashed. I've been playing with some of the parameters of the function but can't seem to get it to look right still.

Here is the function:

Plot[{Sqrt[1 - x^2], -Sqrt[1 - x^2]}, {x, -2, 2}, PlotRange -> {-2, 2}]


Thanks for the help!

-

marked as duplicate by Jens, m_goldberg, Mr.Wizard♦Jul 23 '14 at 18:49

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

I can't find a question which I think this one duplicates, but this question is addressed in the docs under Plot > Examples > Options > AspectRatio. So suggest closing as "easily found in the documentation". –  m_goldberg Jul 23 '14 at 17:51

2 Answers

Change PlotRange to {-1, 1} and set AspectRatio to 1.

Plot[{Sqrt[1 - x^2], -Sqrt[1 - x^2]}, {x, -2, 2},
PlotRange -> {-1, 1}, AspectRatio -> 1]


Result:

PS: That's one of the way, to get the desired output.

-

Just add AspectRatio -> Automatic (the default value is 1/GoldenRatio):

Plot[{Sqrt[1 - x^2], -Sqrt[1 - x^2]}, {x, -2, 2},
PlotRange -> {-2, 2}, AspectRatio -> Automatic]


-
That is interesting! Why do you think it is set up like that with the default being 1/GoldenRatio? Does it benefit some other type of graphics like that? –  Tim H UK Jul 23 '14 at 16:42
Here's why (Ref) –  seismatica Jul 23 '14 at 17:01
@TimHUK: I think the idea is that the axes in Plot often show different quantities (e.g. meters versus seconds), where PlotRange->Automatic would make no sense, and often give extremely stretched results. So WRI chose a fixed ratio that's supposed to be pretty. (But that's really just guessing.) –  nikie Jul 23 '14 at 17:06