matplotlib & proplot :英文Times,中文宋体

import matplotlib.pyplot as plt
from matplotlib import rcParams

plot.rc['figure.facecolor'] = 'w'
config = {
    "font.family":'serif',
    "font.size": 20,
    "mathtext.fontset":'stix',
    "font.serif": ['SimSun'],
}
rcParams.update(config)


plt.title(r'宋体 $\mathrm{Times \; New \; Roman}\/\/ \alpha_i > \beta_i$')

image.png

加入proplot后,不方便显示宋体



import proplot as plot
plot.register_fonts()


import matplotlib.font_manager as fm
timessong = fm.FontProperties(fname='out.ttf')

out.ttf下载