I was wondering if it possible to achieve so that error bars are made white with a black border (in a Pandas bar plot)?
I am trying to achieve what is mentioned in the accepted answer in this post (Border on errorbars in matplotlib/python), however I am wondering if it is possible to implement this for a Pandas plot?
The relevant Pandas plot:
from io import StringIO
import pandas as pd
import matplotlib.pyplot as plt
txt = u'''Category COLUMN1 COLUMN2 COLUMN3
A 0.5 3 Cat1
B 0.3 5 Cat1
C 0.7 4 Cat1
A 0.4 3 Cat2
B 0.8 5 Cat2
C 0.3 4 Cat2
'''
df = pd.read_table(StringIO(txt), sep="\s+")
order = ['Cat2', 'Cat1']
suborder = list("BAC")
df2 = pd.pivot_table(df,index='COLUMN3',columns='Category',values='COLUMN2').loc[order]
df2 = df2[suborder]
df2.plot(kind='bar',
yerr=pd.pivot_table(df,
index='COLUMN3',
columns='Category',values='COLUMN1')
.reindex(df2.index)
.reindex(df2.columns, axis=1), capsize=4)