Skip to content

Instantly share code, notes, and snippets.

@deerainw
Last active January 14, 2018 08:31
Show Gist options
  • Save deerainw/c25b565433bf15a9bda5061eaff6677b to your computer and use it in GitHub Desktop.
Save deerainw/c25b565433bf15a9bda5061eaff6677b to your computer and use it in GitHub Desktop.
用来正常显示中文和负号的 Python 绘图设置语句
import matplotlib.pyplot as plt
plt.rcParams['font.sans-serif'] = ['SimHei'] # 用来正常显示中文标签
plt.rcParams['axes.unicode_minus'] = False # 用来正常显示负号
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment