0

I can plot minor grid lines in a matplotlib log plot like this:

enter image description here

lx = [6,60,100,6]
ly = [40,6,100,40]

fig, ax = plt.subplots(1,1);

plt.plot(lx, ly,'-',  color='k', linewidth=5)

ax.set_yscale('log')

ax.grid(True, which='both', color='b')
ax.minorticks_on()

But when I change the data to:

ly = [40,0.6,10000,40]

I lose my minor grid lines on the log y axis:

enter image description here

How can I get my minor grid lines back please?

R. Cox
  • 819
  • 8
  • 25

0 Answers0