Is it possible to print the value of a variable in an annotation?
gradient = 2.0
intercept = 3.0
r-value = 0.99
ax.annotate('f(x) = gradient * x + intercept R^2 = r-value',
Where gradient, intercept and r-value should be replaced by the value
of the variables in the output.
Regards and a happy new year!