With the following data (for a quick csv file generation, dataset link):
and the following code:
df_all[['all', 'taste','fruit']].melt('fruit').boxplot(column=['value'], by=['fruit', 'variable'], rot=45, fontsize=11, patch_artist=True,
color=dict(boxes='#053061', whiskers='#67001F', medians='#A7D0E4', caps='#67001F'),
boxprops=dict(linestyle='-', linewidth=0.8),
flierprops=dict(linestyle='-', linewidth=0, marker='+'),
medianprops=dict(linestyle='-', linewidth=0.8),
whiskerprops=dict(linestyle='-', linewidth=0.8),
capprops=dict(linestyle='-', linewidth=0.8),
showfliers=True,
grid=False,)
I get this abomination:
I want to achieve
- alternate colors on boxplots (first blue as is, then red and every alternate one red)
- label below every box plot
- legend
something like:
Probably it is impossible to achieve an exact output, but any help is really appreciated!



