1. import matplotlib.pyplot as plt
    2. import matplotlib as mpl
    3. x = ['越秀区', '荔湾区', '天河区', '海珠区', '番禺区', '黄埔区', '白云区']
    4. y = [1.25328309, 0.44401856, -0.11723704, 1.38033869, -0.82220652, -1.4880753, -0.65012149]
    5. mpl.rcParams['font.family'] = 'SimHei'
    6. plt.rcParams['axes.unicode_minus'] = False
    7. plt.xlabel("地区", fontsize=13)
    8. plt.ylabel("热度", fontsize=13)
    9. plt.scatter(x, y)
    10. plt.show()

    6、7行解决中文问题