# How to plot a quarter of circle using Mathematica?

How can I plot a quarter of circle using x as abscissa while y as ordinate by taking advantage of the Plot function of Mathematica when a is in the range of [0,Pi/2] ?

x=2*Sin[a];
y=2*Cos[a];

-
You mean you don't want to use ParametricPlot? –  xzczd Oct 15 '12 at 5:09
@xzczd, I am sorry for my poor experience in using mathematica and I haven't used ParametricPlot till now. But in fact, it really works. –  SunnySky Oct 16 '12 at 0:08

Use ParametricPlot, not Plot:

ParametricPlot[{2*Sin[a], 2*Cos[a]}, {a, 0, Pi/2}]


-
Thanks, that works. –  SunnySky Oct 15 '12 at 5:22
You should leave some easy ones for the newer/intermediate users, y'know... –  rm -rf Oct 15 '12 at 15:13
@rm-rf I doubt SunnySky is unhappy about getting an answer sooner rather than having to wait until later. –  Mr.Wizard Oct 15 '12 at 21:46
It is kinda discouraging to see you answer all the low hanging fruits, is all I'm saying. These posts allow new and intermediate users to feel like they're contributing something to the site and it's important to realize that we also need to constantly build a pool of users who are motivated to answer questions. This is not a race to see who can answer all the low hanging questions... FYI, I prowl the site way more often and compulsively than you do and have been doing so since January; I leave most of the low hanging ones and only answer some when I've gone a stretch without much rep gain. –  rm -rf Oct 15 '12 at 22:09
@rm-rf I'd like to hear about this "problem" from some of the "new and intermediate users" I'm supposedly discouraging rather than one of the top dogs (or frogs). It's not as though I am responding to the majority of questions as I once did on SO; I'm busier now and the site is much busier. I still see the site as being primarily about getting help, not gaining "points," and I feel that delaying or omitting answers works against this goal. –  Mr.Wizard Oct 15 '12 at 22:31

Here is a solution from graphics primitive Circle:

Graphics[Circle[{0, 0}, 1, {0, Pi/2}]]


I am not sure what the final goal of your question is, but maybe this will help - this is how to use graphics primitives inside Plot

Plot[Sin[x], {x, -Pi/2, Pi/2},
Epilog -> {Thick, Circle[{0, 0}, 1, {0, Pi/2}]},
AspectRatio -> Automatic, Frame -> True, Axes -> False]


You can provide a lot of options to Circle, including making it elliptic. Here is basic options for circular arc:

Manipulate[
Graphics[{
{CapForm["Round"], Thickness[.05], Blue,
Circle[{0, 0}, 1, {a, a + s}]},
{Thick, Circle[]}}]
, {{a, 0, "position"}, 0, 2 Pi}
, {{s, Pi/2, "angle"}, 0, 2 Pi}]


-
This is interesting but I don't think it answers the question asked. (+1/-1) –  Mr.Wizard Oct 15 '12 at 5:59
@Mr.Wizard oh, forgot to read below the title... :) keep/delete? –  Vitaliy Kaurov Oct 15 '12 at 6:02
Keep; someone's bound to stumble onto this question when looking for the functionality you show, so I deem it helpful. I just can't make up my mind on the vote. –  Mr.Wizard Oct 15 '12 at 6:05
@Mr.Wizard - I don't see how this wouldn't answer OP's question. Granted Vitaliy doesn't use Plot, but ParametricPlot isn't Plot either. And with Graphic and Circle the result is there! :-) –  stevenvh Oct 15 '12 at 14:47
@stevenvh the OP specifically asks to plot (lower case) this from given equations for x and y over a specific interval. None of that is in this answer. Presumably the OP didn't know about ParametricPlot and just assumed that the functionality was somewhere in Plot. –  Mr.Wizard Oct 15 '12 at 21:43