Open ding123456456 opened 3 years ago
You can solve your problem in the following way:
import matplotlib.font_manager for your preferred font:
from matplotlib.font_manager import FontProperties from matplotlib import pyplot as plt font = FontProperties() font.set_family('serif')
font.set_name('Times New Roman') font.set_style('italic')
add this font to output object:
fig, ax = standard.dos_plain( folder=dos_folder_NA_AFM, output='dos_plain.png', linewidth=1, energyaxis='x', figsize=(6, 3), erange=[-5, 5], fontsize=12, log_scale=False) ax.set_ylabel('Density of States', fontproperties=font) plt.show()
then your can see your font successfully!
Hello, I would like to ask how to change the font type,Such as Song Ti, New Rome, etc.