I want to remove the labels of the second bar that is C1,C2,C3,C4,C5, because it is repeating.
Asked
Active
Viewed 5,672 times
2 Answers
1
You could try:
plt.gca().legend.set_visible(False)
or
plt.gca().legend.remove()
I think.
user101893
- 221
- 1
- 3
0
I think for your case, you need to define them as categories as follows
import pandas as pd
unique_cat = ['C1','C2','C3','C4','C5']
data['Accuracy'] = pd.Categorical(data['Accuracy'], categories = unique_cat)
