- #1
amjad-sh
- 246
- 13
I want to submit an article to an aps journal, so the labels of the figures have the "Times New Roman" font.
I had used the package matplotlib to get the figures and I want to make "Times New Roman" the default font. So, what code I need to write for this to be achieved?
Note that I used the package subplots to get the figures, by implementing this code:
from matplotlib.pyplot import subplots, show
I also tried the code below to check if the font is available:
import matplotlib.font_manager
flist = matplotlib.font_manager.get_fontconfig_fonts()
names = [matplotlib.font_manager.FontProperties(fname=fname).get_name() for fname in flist]
print (names)
if "Times New Roman" in names:
print ("Yes")
else:
print ("font not available")
and the output was "font not available". Does this mean I need to add it to matplotlib? and if yes, how?
I had used the package matplotlib to get the figures and I want to make "Times New Roman" the default font. So, what code I need to write for this to be achieved?
Note that I used the package subplots to get the figures, by implementing this code:
from matplotlib.pyplot import subplots, show
I also tried the code below to check if the font is available:
import matplotlib.font_manager
flist = matplotlib.font_manager.get_fontconfig_fonts()
names = [matplotlib.font_manager.FontProperties(fname=fname).get_name() for fname in flist]
print (names)
if "Times New Roman" in names:
print ("Yes")
else:
print ("font not available")
and the output was "font not available". Does this mean I need to add it to matplotlib? and if yes, how?