Both latex and parameter values in python strings

Viewed 28

I want to add a title to my plots (in matplotlib) which would display both parameters and their values, something like

f"$\alpha$ = {present value of alpha}, $\beta$ = {present value of beta}"

f-strings won't display latex but will insert the present parameter values into the placeholders; r-strings will do the former but not the latter. Any way around this?

0 Answers
Related