I would like to plot a relatively simpler bar chart but struggling to plot using Matplotlib. Could I get some help please. I would like to prepare a chart as shown on this Bar Chart. A sample data is shown below for Tests 1, 2 and 3.
I have more than 20 tests results I would like to plot on a big single plot so I would prefer to cycle through color maps if possible.
My working code so far is this. As you can see my attempt is nowhere near what I need.
"""
A B C
Test 1 1 1.5 2.5
Test 2 1.5 2 3.5
Test 3 1 0.5 1.5
"""
from matplotlib import pyplot as plt
import numpy as np
width = 0.2
x = np.arange(3)
#Test 1
val1 = [1, 1.5, 1]
lab1_x = ['A' for i in range(len(val1))]
plt.bar(x, val1, width)
plt.xticks(x, lab1_x)
#Test 2
val2 = [1.5,2,3.5]
lab2_x = ['B' for i in range(len(val2))]
plt.bar(x+width, val2, width)
plt.xticks(x, lab2_x)
#Test 3
val3 = [1,0.5,1.5]
lab3_x = ['C' for i in range(len(val3))]
plt.bar(x+ 2*width, val3, width)
plt.xticks(x, lab3_x)
plt.legend(["Test 1", "Test 2", "Test 3"], loc = 'best')