I am using Windows 10 with Anaconda and Spyder 4. When using matplotlib
, I would like to use the font Proxima Nova
and render with LaTeX
.
If in my matplotlibrc
file I specify
font.family : Proxima Nova
then the figure renders with the font Proxima Nova
. This means that the font is installed on my system (as it is) and matplotlib can use it. However, if in the matplotlibrc
file I also specify
text.usetex: True
then, even though I have specified Proxima Nova
as the font, the figure renders in the default LaTeX
font, which I guess is Computer Modern
.
I have tried
matplotlib.font_manager._rebuild()
In the source code file and also have tried specifying the fonts in the source code file and not in the matplotlibrc
file. However I always get the same result. I have also followed all the advice on this help page, including making sure that latex, dvipng and ghostscript are all the PATH variable. However nothing seems to work.
I would like to note that I can use Proxima Nova
separately when compiling Latex documents, so that should not be an issue either.
How can I get matplotlib
to be able to use a non-default font and render with LateX
at the same time?