Hey,
I have created a Plot and a Fit and combined them into one loged (both axis) Plot.
Now I have to add the Errorbars but I don’t know how and I can’t find any solution online.
thanks!
Hey,
I have created a Plot and a Fit and combined them into one loged (both axis) Plot.
Now I have to add the Errorbars but I don’t know how and I can’t find any solution online.
thanks!
assume your function is x^2 and the errors are given at positions 1, 2, 4 and 6.
Try
f[x_] := x^2
errors = {{1, 5.1}, {2, 6.3}, {4, 3.}, {6, 8.3}};
bars = {{#[[1]], f[#[[1]]] - #[[2]]}, {#[[1]], f[#[[1]]] + #[[2]]}} & /@ errors
Plot[f[x], {x, 0, 7}, Epilog -> Line /@ bars]