-
Notifications
You must be signed in to change notification settings - Fork 0
03.plot
wwj-2017-1117 edited this page Nov 24, 2019
·
1 revision
import numpy as np import matplotlib.pyplot as plt import matplotlib.font_manager as fm
x = np.linspace(0, 10, 100) plt.plot(x, np.sin(x))
zhfont1 = fm.FontProperties(fname='C:\Windows\Fonts\simkai.ttf') plt.title('正弦函数', fontproperties=zhfont1) plt.xlabel('x') plt.ylabel('sin(x)') plt.show()