I would like to use the Latex font in my Matplotlib diagrams. On Windows I have set the the system environment variable PATH to include the paths to MikTex's bin\x64 folder, where the latex and dvipdf and dvipng scripts are located and to Ghostscripts GS\BIN folder.
However when I am trying to use the Latex font like this
from matplotlib import rc
rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']})
rc('text', usetex=True)
I get an error message that the font was not found:
...\Anaconda3\lib\site-packages\matplotlib\font_manager.py:1331: UserWarning: findfont: Font family ['sans-serif'] not found. Falling back to DejaVu Sans
(prop.get_family(), self.defaultFamily[fontext]))
I also tried deleting the Matplotlib cache, but I still get the same error.
What did I forget to do or what am I getting wrong here?