I am trying to create an errorbar plot with different x- and y-errors. Let's say i have the following data:
x = [[item%20 for item in reversed(range(50,55))] for _ in range(13)]
y = [[item%20 for item in reversed(range(20,25))] for _ in range(13)]
fig, ax = plt.subplots()
ax.set_xscale('log')
for i in range(len(x)):
plt.errorbar(x=[x[0][i]], y=[y[0][i]], xerr=x[i][1:3], yerr=y[i][1:3], ls='None', label='B{}D{}'.format(x[i][3],y[i][4]))
plt.legend(prop={'size': 6})
Now this will create an error:
ValueError: err must be [ scalar | N, Nx1 or 2xN array-like ]
However, I do not understand this error, as my error has the shape (2, N=1), just like ma data is N=1. When I transpose my data and plot it, it works just fine, but I want to plot every datapoint with a different labelm marker and color. For me it would also be okay to plot all errorbars at once and change the colors, markers and assign a label afterwards, however I do not know how to do so. However, I believe that I am doing a simple mistake which would make that approach unnecessary.
Any help is highly appreciated :)