import matplotlib.pyplot as plt
from matplotlib.font_manager import FontProperties
font = FontProperties(fname='/System/Library/Fonts/STHeiti Light.ttc', size=16)
plt.plot([0, 1], [1, 2])
plt.title('显示中文', fontproperties=font)
plt.show()
import matplotlib.pyplot as plt
from matplotlib.font_manager import FontProperties
font = FontProperties(fname='/System/Library/Fonts/STHeiti Light.ttc', size=16)
plt.plot([0, 1], [1, 2])
plt.title('显示中文', fontproperties=font)
plt.show()