0

I set the scale of Y to log:

plt.yscale('log')

But I want remove the smaller scale in y axis, and only keep the 10^k (k is integer) on the scale. How to do it?

enter image description here

sauerburger
  • 4,569
  • 4
  • 31
  • 42
chenzhongpu
  • 6,193
  • 8
  • 41
  • 79

1 Answers1

2

The small lines on the y-axis are called minorticks in matplotlib parlance.

You can turn them off with

plt.minorticks_off()
sauerburger
  • 4,569
  • 4
  • 31
  • 42