天天看点

plt.grid

https://matplotlib.org/api/_as_gen/matplotlib.pyplot.grid.html#matplotlib.pyplot.grid

plt.grid(True) # 显示背景的网格线

plt.grid(False) # 关闭背景的网格线

ax.grid(color=’r’, linestyle=’-‘, linewidth=2) # 设置背景网格线的样式

继续阅读