How to add space in the top of my bar plot?

Viewed 591

How to add space in the top of my bar plot? Here, i'm using seaborn and matplotlib to make the bar plot.

sns.set_style('darkgrid')

fig = plt.figure(figsize=(8,5))
plots = sns.barplot(x = ['Positif', 'Negatif'], y = data['label'].value_counts(), palette=['#588b8b','#c8553d'])

for bar in plots.patches:
    plots.annotate(format(bar.get_height(), '.2f'), 
                   (bar.get_x() + bar.get_width() / 2, 
                    bar.get_height()), ha='center', va='center',
                   size=12, xytext=(0, 8),
                   textcoords='offset points')
    
plt.xlabel("sentiment", size=12)
plt.ylabel("count", size=12)
plt.suptitle("Value Count\nPositive and Negative Label", size=16)
plt.show()

enter image description here

0 Answers
Related