0

I'm trying to plot this chart, but I don't find the first y-axis value (0.0) useful. How to "skip" it?

Chart

import matplotlib.pyplot as plt

x = range(0, 1100, 100)
y = [0.025, 0.508, 0.547, 0.566, 0.58, 0.59, 0.6, 0.605, 0.608, 0.615, 0.620]

plt.plot(x, y)

plt.xticks(range(0, 1100, 100))
plt.grid()

plt.show()
plusik
  • 3
  • 1
  • By "skip", do you mean you want the axes limits to stay as they are, but not to show the tick label at 0.0, or to shift the axes up so that 0.0 is not even visible? – gmds Apr 02 '19 at 11:19
  • @gmds I'd prefer to shift the y-axis, but shorter answer will be best. – plusik Apr 02 '19 at 11:29

1 Answers1

0

In this specific case, this will do:

plt.yticks(plt.yticks()[0][2:])
gmds
  • 19,325
  • 4
  • 32
  • 58