The goal here is to create a grouped bar plot, not subplots like the image below
Is there a simple way to create a grouped bar plot in Python? Right
You can simply do this using the code given below:
import pandas as pd
import matplotlib.pyplot as plt
positive_values = [20, 17.5, 40]
negative_values = [15, 8, 70]
index = ['Precision', 'Recall', 'f1-score',]
df = pd.DataFrame({'Positive Values': positive_values,
'Negative Values': negative_values}, index=index)
ax = df.plot.bar(rot=0, color={"Positive Values": "green", "Negative Values": "red"})
Output: