Each bar has large width
How can I reduce the width of bars, as shown by the drawn red rectangles?
I have the following code in Google Colab.
model_names = ['RFC', 'KNN', 'D-tree', 'SVM RBF']
accuracies = [0.999, 0.970, 0.997, 0.985]
plt.figure(figsize=(6, 2))
ax = sns.barplot(x=model_names, y=accuracies)
plt.xlabel('Model')
plt.ylabel('Accuracy')
plt.title('Model Accuracies Comparison ')
for i, accuracy in enumerate(accuracies):
ax.annotate('{:.3f}'.format(accuracy), xy=(i, accuracy), xycoords='data', ha='center', va='bottom', fontsize=10)
plt.show()