I have a problem with putting arrowheads on my parametric plot, I have looked through the various examples on here, which all work fine, but when I replace it with the code for my parametric plot, I get the error:
Arrow setbacks VertexColors -> Automatic should be a number or pair of numbers.
For example,
This code works to put an arrow halfway along a plot which is what i would like to do on my own plot
ClearAll[f, x, data];
f[x_] := x^2;
data = Table[{x, f[x]}, {x, -10, 10, 0.1}];
p0 = ListPlot[data, Frame -> True, Axes -> False, Joined -> True,
PlotStyle -> {Blue, Thick}];
p0 /. Line[x_] :> {Arrowheads[{0,0.1,0}], Arrow[x]}
and produces
However, when i change it over to my plot:
p0 = ParametricPlot[{x, y}, {t, 0, pt[[1]]}, PlotStyle -> Thick,
PlotRange -> {{-0.8, 0.8}, {-0.8, 0.8}},
ColorFunction -> Function[{x, y, t}, Hue[0.7*t]], Frame -> True,
FrameLabel -> {{"y/λ", None}, {"x/λ",
HoldForm["f" = Fi]}},
GridLines -> {{0.4, 0, -0.4}, {-0.4, 0, 0.4}},
FrameTicksStyle -> Thick,
FrameTicks -> {{{-0.8, -0.4, 0, 0.4, 0.8},
None}, {{-0.8, -0.4, 0, 0.4, 0.8}, None}},
GridLinesStyle -> Opacity[0.5], Axes -> False, ImageSize -> 300,
PlotRangePadding -> None, BaseStyle -> {FontSize -> 18},
AspectRatio -> Automatic];
p0 /. Line[x_, y_] :> {Arrowheads[{0, 0.1, 0}], Arrow[x, y]}
i get this:
For the life of me i can't figure this out, the plot appears but is covered in the dreaded red box with the error message i gave at the top of the page.
x
,y
, andpt
are undefined. Hence,ParametricPlot
fails. $\endgroup$