1

Here is my diagrams, enter image description here

I want to remove the labels of the second bar that is C1,C2,C3,C4,C5, because it is repeating.

Lars
  • 140
  • 1
  • 6
Tariq Hussain
  • 53
  • 1
  • 2
  • 8

2 Answers2

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)