I have this Data and I would like to make a colored curve. Using LisPlot
gives the desired colored curve, but using ListLinePlot
adds noise to the curve. Here is the code(MATHEMATICA 12):
colorBar1[arg_] := Blend[{Black, Cyan}, Rescale[arg, {0, 1}]]
ListPlot[Style[{#[[1]], #[[2]]}, colorBar1[#[[3]]]] & /@ Data,
PlotStyle -> Directive[Thickness[0.01]], Axes -> True,
AspectRatio -> 0.5, ImageSize -> 400,
PlotRange -> {{-1.7, 1.7}, {-0.43, 0.43}}]
Now, using LisLinePlot gives this
size=Length[Data];
ListLinePlot[Data[[1 ;; sizeListLinePlot[Data[[All, 1 ;; 2]],
ColorFunction ->
Function[{x, y},
colorBar1[Data[[Position[Data[[All, 1]], x][[1, 1]], 3]]]],
ColorFunctionScaling -> False,
PlotStyle -> Directive[Thickness[0.01]], Axes -> True,
AspectRatio -> 0.5, ImageSize -> 400,
PlotRange -> {{-1.7, 1.7}, {-0.43, 0.43}}]
I don't know why the bottom branch of the curve is colored-dashed now?