I often have the following notebook in Mathematica, which I use to make a dataset and associated errors:
x = {0, 2, 4, 6, 10, 20};
y = {979, 146, 141, 157, 187, 274};
uncY = Sqrt[y];
dataVector = Thread[{x, y}];
I want to make an ErrorListPlotErrorListPlot
, so I need to add ErrorBar
with each uncY
-value as an element in each data pair. So the final dataVectordataVector
should have the form
{{x_i, y_i}, Errorbar[uncY_i]}
What is an easy way to achieve this, without using a For
-loop?