import matplotlib.pyplot as plt
import matplotlib
# 设置中文字体
matplotlib.rcParams['font.sans-serif'] = ['SimHei']
matplotlib.rcParams['font.family']='sans-serif'
plt.plot([1, 2, 3, 4])
plt.xlabel('这是x轴')
plt.ylabel('这是y轴')
plt.title('这是标题')
plt.show()
用这个代码之前

用了之后
![]()















![[Java]线程生命周期与线程通信](https://img-blog.csdnimg.cn/direct/4f64d89615ac435aa43328fa42559192.png)


