train_class = train_df['Class'].value_counts().sortlevel()
my_colors = 'rgbkymc' #red, green, blue, black, etc.
train_class.plot(kind='bar', color=my_colors)
plt.grid()
plt.show()
I'm getting:
Value Error : Invalid RGBA argument : 'rgbkymc'
I can't get the reason why I'm getting this error as I have checked everything and it seems fine.
Can anyone help me identify the error, please?
KeyError Traceback (most recent call last)
~Anaconda3libsite-packagesmatplotlibcolors.py in to_rgba(c, alpha)
131 try:
--> 132 rgba = _colors_full_map.cache[c, alpha]
133 except (KeyError, TypeError): # Not in cache, or unhashable.
KeyError: ('rgbkymc', None)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…