# Plotting discrete points on a phase plot

I'm trying to generate a phase plot of a sinusoidal voltage at discrete points using the following code:

ListPlot[Table[{5*Sin[n*π/4 + π/3], 5*Cos[n*π/4 + π/3]}, {n, 8}],
AspectRatio -> 1, AxesLabel -> {"Real", "Imaginary"}, PlotLabel -> "Plot 1d"]


I would also like to make it so there is an arrow that originates at the origin and ends at each point on the plane. Also, I would like to label each point with its corresponding value of n. Is this possible? How can I do it?

-
Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Read the faq! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! –  belisarius Jan 17 at 4:17
@belisarius thank you for this excellent introductory advice. I certainly would have valued this with my first encounter. It seems a comment that should be reproduced (with attribution). –  ubpdqn Jan 17 at 9:36
@ubpdqn A pity you haven't got one of them. Here is the full set meta.mathematica.stackexchange.com/q/597/193 :) –  belisarius Jan 17 at 12:19

## 1 Answer

t = Table[{n, 5*Sin[n*π/4 + π/3], 5*Cos[n*π/4 + π/3]}, {n, 8}];
ListPlot[t[[All, 2 ;;]], AspectRatio -> 1, AxesLabel -> {"Real", "Imaginary"},
PlotLabel -> "Plot 1d", PlotRangePadding -> 2.8] /.
Point@x_ :> ({Arrow[{{0, 0}, #}], Text[Nearest[Thread[N@t[[All, 2 ;;]] ->
t[[All, 1]]], #], 1.2 #]} & /@ x)


-
Thanks! That is exactly what I meant by the arrows, but I meant for the data point labels to represent the parametric x values, (0,1,2,3,4,5,6,7,8). I apologize. I shouldn't have used x as the parametric variable. –  CrawdadMan Jan 17 at 3:22
Thank you so much! Could you please clarify what you did? –  CrawdadMan Jan 17 at 5:29
@CrawdadMan sorry, no time today. Perhaps someone else can –  belisarius Jan 17 at 5:30