I want to write a mathematical expression in a pyplot label and inside this expression I want to use values of variables. It should look like this
I thought this could maybe done with string formatting. But the following doesn't work
values = np.array([0.123, 1.234])
plt.plot(x, y, label='best fit curve $y={0:.2f}x+{1:.2f}$'.format(values))

