# How can I re-attach these arrowheads to my curve?

I have a bunch curve that I would like to add arrowheads to. A working example is this one,

ParametricPlot[
{-Re[Cos[0.0456 (2.9 + 18.2 I - I s)]],
-Im[Cos[0.0456 (2.9 + 18.2 I - I s)]] + 0.008 s}
, {s, 0, 18.2}
, ImageSize -> 600
, Frame -> True
]


which roughly looks like this:

Unfortunately, when I do the standard thing and substitute my Line element for an Arrow,

ParametricPlot[
{-Re[Cos[0.0456 (2.9 + 18.2 I - I s)]],
-Im[Cos[0.0456 (2.9 + 18.2 I - I s)]] + 0.008 s}
, {s, 0, 18.2}
, ImageSize -> 600
, Frame -> True
]/. {Line[stuff_] -> Arrow[stuff]}


I get some pretty funky output, with the arrowhead detached from the rest of the curve:

The effect can be seen a bit better by setting AspectRatio → 1, which looks like this:

This is a bit of a problematic curve to arrowify, since it has a very sharp uptick at the end, but that should be something for me to handle, not something that should cause Mathematica to go belly up and stop displaying the curve.

How can I add an arrowhead to this curve?

## 1 Answer

Arrow can't handle so many points? Drop them.

ParametricPlot[{-Re[
Cos[0.0456 (2.9 + 18.2 I - I s)]], -Im[
Cos[0.0456 (2.9 + 18.2 I - I s)]] + 0.008 s}, {s, 0, 18.2},
ImageSize -> 600, Frame -> True,
AspectRatio ->
1] /. {l : Line[stuff_] :> {l, Arrow@stuff[[{-2, -1}]]}}


• Yeah, that's brilliant. It does weirdly add a dot at the end, so it still needs some fiddling, but it does the job. Commented Sep 1, 2016 at 13:21
• You can wrap the Arrow in a list and supply Arrowheads up front if you want to control the size and/or color of the arrowhead. {l, {Red, Arrowheads[0.02], Arrow@stuff[[{-2, -1}]]}} Commented Sep 1, 2016 at 14:47