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
  • 3,450
  • 3
  • 25
  • 38
chenzhongpu
  • 5,412
  • 7
  • 38
  • 70

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
  • 3,450
  • 3
  • 25
  • 38