import matplotlib.pyplot as plt
from matplotlib import font_manager
import numpy as np
x = np.arange(50)
y = np.sin(x)
plt.figure(figsize = (12,6))
plt.plot(x,y,'-',c = 'r')
font = font_manager.FontProperties(fname = r'C:\Windows\Fonts\STXINGKA.TTF' ,size = 20)
plt.title("某某鸡鸡长度早晚变化",fontproperties = font)
plt.ylabel("单位:厘米",fontproperties = font)
plt.xlabel("持续时间:秒",fontproperties = font)
plt.show()