In the following example the colour in the legend for data_3 will not appear as the same colour that is set in plt.errorbar([..],color='red'). Strangle this only applies to certain symbol and colour combinations. For example a red square will appear as a black square in the legend however a red circle will appear correctly in the legend. This seems to only be an issue when the legend is positioned outside the figure. Here is a worked example: import matplotlib.pyplot as plt import matplotlib import seaborn as sns sns.set() # set style of plots to seaborn
matplotlib.rcParams['legend.handlelength'] = 0
matplotlib.rcParams['legend.markerscale'] = 1
labels = ['data_1','data_2','data_3','data_4']
symbols = ['o','D','s','D']
fill_style = ['none','full','none','full']
colours = ['MediumPurple','Maroon','red','yellowGreen']
x=range(10)
y=range(10)
for i in range(len(symbols)):
plt.errorbar(x,[a+i*2 for a in y],elinewidth=1,color=colours[i],fmt=symbols[i],label=labels[i],ms=4,fillstyle=fill_style[i],markeredgewidth=1.75,markeredgecolor=colours[i])
plt.legend(loc='center left',bbox_to_anchor=(1, 0.5))
