justou
2016-11-02 12:45:21 +08:00
这样的?
# -*- coding: utf-8 -*-
import matplotlib.pyplot as plt
from matplotlib.font_manager import FontProperties
song_ti = FontProperties(fname=r'C:\Windows\Fonts\simsun.ttc', size=20)
times_new_roman = FontProperties(fname=r'C:\Windows\Fonts\times.ttf', size=15)
ax = plt.gca()
ax.set_title(u'能量随时间的变化', fontproperties=song_ti)
ax.set_xlabel('Time (s)', fontproperties=times_new_roman)
ax.set_ylabel('Energy (J)', fontproperties=times_new_roman)
plt.show()