1
$\begingroup$

I would like to plot a list with ErrorListPlot but each dot with a different color like the example in the ListPlot's documentation :

ListPlot[Table[Style[{Cos[t], Sin[2 t]}, Hue[t/(2 Pi)]], {t, 0, 2 Pi,Pi/20}], PlotStyle -> PointSize[Medium]]

I have some trouble to adapt this for ErroListPlot. Is there a similar way to do it ?

edit :

here my list of data :

data =  {{{100, 190.643}, ErrorBar[1.07807]}, {{200, 187.951}, ErrorBar[1.13827]}, {{400, 186.07},   ErrorBar[1.28594]}, {{800, 183.452},   ErrorBar[1.63607]}, {{1600, 181.18}, ErrorBar[2.53651]}}

I tried to color (with different color) each {{x, y}, ErrorBar[err]} , just the {x,y} and just the y but none of these options worked.

$\endgroup$
2
  • $\begingroup$ If you would give an example of your data (with the errors) to play with... $\endgroup$ Commented Apr 3, 2019 at 12:27
  • $\begingroup$ Done. Thank's ! $\endgroup$
    – Dalnor
    Commented Apr 3, 2019 at 12:35

1 Answer 1

1
$\begingroup$

Update: In versions 12.+, you can use Around to create a new data set that can be used with ListPlot to get the desired picture without the need for ErrorListPlot:

data2 = data /. {{a_, b_}, ErrorBar[c_]} :> {{a, Around[b, c]}};

ListPlot[data2, IntervalMarkersStyle -> Thick] 

enter image description here

Original answer:

You can wrap each data element with List:

ErrorListPlot[List /@ data]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.