我目前正在使用 matplotlib.pyplot
来创建图形,并希望有坚实和黑色的主要网格线和次要的灰色或虚线。
在网格属性中,which=both/major/mine
,然后颜色和线条样式由线条样式简单地定义。有没有办法只指定次要线条样式?
到目前为止,我的合适代码是
plt.plot(current, counts, 'rd', markersize=8)
plt.yscale('log')
plt.grid(b=True, which='both', color='0.65', linestyle='-')