Math notation in texts using Matplotlib

plt.title("$y = x^2$")

Note that backslashes '\' must be escaped (e.g. "\\alpha"), or used inside raw strings (e.g. r"\alpha").

Related:

References: