在Jupyter中使用Matplotlib显示不出来中文
发布时间
阅读量:
阅读量
文章结构概述
-
-
- 问题
- 应对策略
- 终点
- 问题
-
问题
在Jupyter环境中应用matplotlib库时,中文字符无法正常呈现
import matplotlib.pyplot as plt
plt.figure(figsize=(5,4),dpi=80)
x=[1,2,3]
y=[3,2,1]
plt.plot(x,y,label='测试') #绘制图像
plt.xlabel('x轴')
plt.ylabel('y轴')
plt.legend(loc='lower left') #显示图例
plt.show() #显示图像

解决方法概述
p
全部评论 (0)
还没有任何评论哟~
