I want to have text rendering with Latex for titles, labels, etc. of plots.
from matplotlib.pyplot import plot, show, xlabel, ylabel, legend, title
from numpy import array
import matplotlib.pyplot as plt
xdata = array([10, 20, 30, 40, 50, 60, 70, 80, 90])
ydata = array([1, 8, 3, 3, 4, 5, 7, 8, 16])
plot(xdata, ydata, 'x')
plt.rcParams["text.usetex"] = True
plt.rcParams['text.latex.preamble'] = r'\usepackage{amsmath}'
plt.title(r'$\alpha$')
show()
A basic requirement would be a Greek letter, like shown in the above code in my opinion. The result is not a rendered symbol, but just the plain text I entered.
I know I have a valid MikTex distribution, with path set correctly.
I tried a few things like doubled dollar signs $$, or import amsmath.
When I produce an invalid Latex code like unclosed math mode/uneven number of dollar signs, I can see at the console that MikTeX is involved and throws an error. So it seems to be installed correctly, and to be known by the Pycharm IDE or so. But at the end of the day, it doesn't compile a single expression.