I've run into some difficulty adding error bars to my plots I've created in Python using Seaborn.
I currently have a data frame in a 'csv' format;
TSMdatabase = 'TSMvsRunmaster.csv';
tsmdf = pd.read_csv(TSMdatabase, sep=',');
The Dataframe has this heading format:
Run,TSMX_Value,TSMX_Error,TSMX+1_Value,TSMX+1_Error,Source
I then use a for loop to read in the different TSM values:
TSM = ['001', '002', '003', '004', '010', '011', '012',
'013', '016', '017', '101', '102', '104', '105', '106']
for x in TSM:
tsm = x
And then finally I plot giving me:
plt.figure()
sns.set_style("darkgrid")
ax = sns.stripplot(x="Run", y='TSM'+str(tsm)+'_Value', hue="Source", data=tsmdf,
jitter=True, palette="Set2", split=True)
plt.xticks(rotation=40)
plt.title('Run TSM'+str(tsm)+' Comparison')
plt.show()
Plot for certain TSM without Error Bars
If I then try to add error bars, I end up with just one Error Bar in the middle of each sub data set:
where each source, Python and Matlab actually has their own errors in the data frame!
Does anybody have any ideas! Thank you very much indeed!