I want to remove the labels of the second bar that is C1,C2,C3,C4,C5, because it is repeating.
2 Answers
$\begingroup$
$\endgroup$
You could try:
plt.gca().legend.set_visible(False)
or
plt.gca().legend.remove()
I think.
$\begingroup$
$\endgroup$
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)