使用matplotlib绘图时,标签用中文出现乱码情况

# 设置中文字体
matplotlib.rcParams['font.family'] = 'SimHei'
matplotlib.rcParams['axes.unicode_minus'] = False

设置字体集解决

你可能感兴趣的:(matplotlib)