Here is how I bar-plot from a group:
import numpy as np
import matplotlib.pyplot as plt
metrics = ['accuracy', 'precision', 'recall','f1_score', 'roc_auc_score']
x_values = np.arange(len(metrics))
width = 0.15
RF = [0.62, 0.59, 0.62, 0.57, 0.78]
SMOTE = [0.63, 0.62, 0.63, 0.60, 0.79]
AdaBoost = [0.27, 0.42, 0.27, 0.28, 0.58]
SMOTEBoost = [0.54, 0.60, 0.54, 0.57, 0.68]
decoc = [0.63, 0.61, 0.63, 0.58, 0.69]
plt.bar(x_values-0.2, RF, width=width, label='RF')
plt.bar(x_values, SMOTE, width=width, label='SMOTE')
plt.bar(x_values+0.2, AdaBoost, width=width, label='AdaBoost')
plt.bar(x_values+0.4, SMOTEBoost, width=width, label='SMOTEBoost')
plt.bar(x_values+0.6, decoc, width=width, label='DECOC')
plt.xticks(x_values, metrics)
plt.legend(loc='best')
plt.ylim(0.0, 1.2)
plt.title('Performance Evaluation')
plt.xlabel('Performance Metrics')
plt.show()
But I need a space between each group ('accuracy', 'precision', 'recall','f1_score', 'roc_auc_score')
to make it better. As it is, groups are mixed with almost no space separating.