I would like to use ListLinePlot with data from excel file but it does not work! However, ListPlot is working fine?! Below is the code I used
colorBar[arg_] := Blend[{Red, Green, Blue}, Rescale[arg, {-1, 1}]];
postE = Table[{x, 0.05 + Cos[x]^2, Cos[x]}, {x, 0, 30, 0.05}];
ListLinePlot[{Style[{#[[1]], #[[2]]}, colorBar[#[[3]]]] & /@ postE}]
ListPlot[{Style[{#[[1]], #[[2]]}, colorBar[#[[3]]]] & /@ postE}]
colorBar
? $\endgroup$colorBar
prior to using it. Moving thecolorBar
definition to the beginning of your code above produces a perfectly fine graph. $\endgroup$ListLinePlot
gives only one color but I need the color to be as in theListPlot
$\endgroup$