Can I have some help with seaborn swarmplot? Each point on the swarmplot represents mean of one group. Separately, I have also calculated standard deviation of each group. Is there a way to plot errorbar of one standard deviation on each data point in the swarmplot?
I tried seaborn swarmplot. But cannot add errorbar. I also tried scatter plot with errorbar, but multiple points with same X-value overlapped too much.
Example:
X = np.arange(0,10)
Y = np.random.normal(5,0.0003,(10,10))
E = np.random.normal(0.0001,0.00002,(10,10))
for i in range(Y.shape[0]):
plt.errorbar(X,Y[i], yerr = E[i],ls='none',marker = 'o')
plt.show()
Seaborn only draws error bars if you let it calculate the errors from the original data. You can mimic seaborn's approach by manually adding a delta to simulate seaborn's dodging.
Here is some example code to show how it could work. I changed the dimensions to be different from each other, to make sure the example code doesn't mix them up.