0

i was just wondering if anyone knows how to choose individual bar colours for a seaborn factor plot. I'm currently passing a list called custom_palette of all the colours that i want but this just results in all the bars being the same colour.

plot = sns.factorplot(legend = False, x='Region', y='Values', hue='Types', data=data, kind='bar', size=8, aspect=2, palette= custom_palette)

enter image description here

Paul H
  • 65,268
  • 20
  • 159
  • 136
  • what is `custom_palette`? hardcode its value into your question and use one of seaborn's bundled datasets as your data – Paul H Feb 19 '18 at 16:24
  • Its just a list of different colours. –  Feb 19 '18 at 16:39
  • What is meant here is that you should provide a [mcve] of the issue, i.e. a code that people can copy and paste to reproduce the problem. By just looking at the plot it is not clear how the data looks like and whether this should hence work or not. – ImportanceOfBeingErnest Feb 19 '18 at 16:41
  • do you mean something like this: https://stackoverflow.com/questions/36305695/assign-a-color-to-a-specific-box-in-seaborn-boxplot/36331317#36331317 – tmdavison Feb 19 '18 at 17:04

0 Answers0