#coding:utf-8
import matplotlib.pyplot as plt
# 前者使中文设置成宋体,后者将中文外的字体设置成 Palatino Linotype
plt.rcParams['font.sans-serif'] = 'NSimSun, Palatino Linotype'
# your code
saveaddr = '1.png'
# bbox表示bounding box, tight表示紧凑,可以减少保存图片后上下左右的空白(直接show时无法看出效果)
plt.savefig(saveaddr, bbox_inches='tight')