我想用各種陰謀使用自定義配色方案,但不能讓它的工作(使用seaborn和/或matplob &大熊貓爲這些地塊)使用熊貓/ matplotlib/seaborn蟒蛇自定義顏色方案
flatui = ["#9b59b6", "#3498db", "#95a5a6", "#e74c3c", "#34495e", "#2ecc71"]
ax = sns.violinplot(x="Contents", y="Flavour", data=rd, color="lol", inner="box")
我得到錯誤代碼:
ValueError: to_rgb: Invalid rgb arg "flatui"
could not convert string to float: 'flatui'
即使
ax = sns.violinplot(x="Contents", y="Flavour", data=rd, color=["9b59b6", "#3498db", "#95a5a6", "#e74c3c", "#34495e", "#2ecc71"], inner="box")
母鹿snt work
請幫忙!
可能的重複[如何使用seaborns color \ _palette作爲matplotlib中的顏色映射?](http://stackoverflow.com/questions/37902459/how-do-i-use-seaborns-顏色調色板作爲一個顏色映射在matplotlib) – Serenity