Hello!
I'm trying to Plot some data points with their x- and y-error.
So lets say i have two datasets with their errors:
x = {1, 2, 3};
y = {1, 4, 9};
xerror = {0.2, 0.2, 0.3};
yerror = {0.1, 0.4, 0.8};
Then I combine them to get a dataset I can plot:
dataset1 = Transpose[{x[[All]], y[[All]], yerror[[All]]}];
ErrorListPlot[dataset1]
Which gives me a nice Plot with the y-errors. However, if I want to add x-errors too I have to do the following:
ErrorListPlot[{{{1, 1}, ErrorBar[0.2, 0.1]}, {{2, 4}, ErrorBar[0.2, 0.4]}, {{3, 9}, ErrorBar[0.3, 0.8]}}]
It also works pretty well, however it is a lot of work if i do not have 3 datapoints but 60. So is there a way to do this faster? I thought of something like
dataset2 = Transpose[{x[[All]], y[[All]], ErrorBar[xerror[[All]], yerror[[All]]]}];
ErrorListPlot[dataset2]
Of course this is not working, but I think it kind of represents what I'd like to do. Do you guys know how to solve this problem?
Best regards,
Tobias