赞
踩
import matplotlib.pyplot as plt import numpy as np from matplotlib import rcParams # print(plt.style.available) # 查看可选择的样式 figsize = (5, 2.9) title_size = 10 plt.rcParams['xtick.direction'] = 'in' plt.rcParams['ytick.direction'] = 'in' time = np.arange(1, 8).reshape(7).tolist() fig = plt.figure(figsize=figsize) ax = fig.add_subplot(111) ax.plot(time, time) ax.spines['right'].set_visible(False) # 去掉边框 ax.spines['top'].set_visible(False) # 去掉边框 ax.grid(zorder=1, axis='y') plt.show()
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。