I am currently using matplotlib.pyplot
to create graphs and would like to have the major gridlines solid and black and the minor ones either greyed or dashed.
In the grid properties, which=both/major/mine
, and then color and linestyle are defined simply by linestyle. Is there a way to specify minor linestyle only?
The appropriate code I have so far is
plt.plot(current, counts, 'rd', markersize=8)
plt.yscale('log')
plt.grid(b=True, which='both', color='0.65', linestyle='-')
plt.minorticks_on()
for the minor grid to actually appear. See https://mcmap.net/q/152480/-cannot-get-minor-grid-lines-to-appear-in-matplotlib-figure – Mazarin