In the following code the legend should be the names specified in the list, but as you can see in the figure, only the first letter is shown.
bench = ['AA', 'BB']
offset = 0
for b in bench:
L1 = [12+offset, 5+offset, 3+offset]
L2 = [20+offset, 22+offset, 25+offset]
offset += 5
plt.plot(L1, L2)
plt.legend(b)
plt.savefig('test4.png')
plt.show()
How can I fix that?


