# Arrow at the end of a parametric plot

GROUPS:
 I would like to add an arrowhead to the end of the parametric plot: ParametricPlot[{Cos[t], Sin[t]}, {t, 0, 1}] Is there an option to ParametricPlot to do this? I could not find it. If there is no option, can you please suggest a way to do this?
4 years ago
5 Replies
 Check with In[7]:= FullForm[ParametricPlot[{Cos[t], Sin[t]}, {t, 0, 1}]] where the function data are and draw an arrow there In[13]:= Graphics[Arrow[ParametricPlot[{Cos[t], Sin[t]}, {t, 0, 1}][[1, 1, 3, 2]]], Axes -> True] 
4 years ago
 Thank you, this worked to some extent, but not in all the cases I need it. For example in Graphics[Arrow[ParametricPlot[{Cos[t], Sin[t]}, {t, 0, -1}][[1, 1, 3, 2]]], Axes -> True] the arrow goes to the wrong end of the curve. It goes to the end corresponding to t=0, not to t=-1. Is there some place I can look up a documentation how the FullForm of ParametricPlot is generated?
 Then one uses Arrowheads[] In[180]:= Graphics[{Arrowheads[{-.1, 0}], Arrow[ParametricPlot[{Cos[t], Sin[t]}, {t, 0, -1}][[1, 1, 3, 2]]]}, Axes -> True] or even better does a function headEnd[] to generate {-.1, 0} or {0,.1} to place the heads to the right end with the right orientation. There is a documentation for FullForm, one looks into it's output and finds out, where the interesting things do appear, just try it yourself. This method is unfortunately not version independent, but given that Mathematica is also modular (everything is an expression), it is often successful.
 Udo Krause 1 Vote Unfortunately, version dependent solution is not good enough for me. Okay. I was hoping for a more elegant solution. And your hope comes true ... you program it along the following lines In[34]:= Clear[arrowParametricPlot] arrowParametricPlot[f_List, p_List] := Block[{[Delta] = (p[[3]] - p[[2]])/100.}, ParametricPlot[f, p, Epilog -> {Arrowheads[.1, 0], Arrow[{f /. p[[1]] -> p[[3]] - [Delta], f /. p[[1]] -> p[[3]]}]}, PlotRange -> All] ] /; Length[f] == 2 && Length[p] == 3 && !FreeQ [f[[1]], p[[1]]] && !FreeQ[f[[2]], p[[1]]] producing pictures likeof course, there's no free lunch, so get the color of the arrow right on your own, please.