Questions tagged [countplot]

seaborn.countplot shows the counts of observations in each categorical bin using bar. A count plot can be thought of as a histogram across a categorical, instead of quantitative, variable. Also use the seaborn tag.

17 questions
0
votes
0 answers

Countplot set_yticklabels

I plot a seaborn countplot with gender that contains 2 categories (1: Male, 2: Female). fig01 = sb.countplot(x = df.gender.values) fig01.set_xticklabels(['Male', 'Female']) fig01.set_yticklabels(['{}M'.format(int(num)) for num in…
Ong K.S
  • 229
  • 1
  • 4
  • 15
-1
votes
2 answers

How can I add a legend to countplot?

I'm trying to add a legend in this countplot. I don't know where is the problem? why it's not working. Will any brother help me to solve this problem? ax=sns.countplot(x='Tomatoe types', data=df) ax.set_title('Tomatoe types',fontsize = 18,…
Shakib
  • 1
  • 1
  • 5
1
2