title: How to force matplotlib to show values on x-axis as integers
body: <p>Code like this:</p>
  
  <pre><code>plt.ticklabel_format(style='plain', axis='x', useOffset=False)
  plt.plot(range(1, 3), logger.acc)
  plt.xlabel("Epochs")
  plt.ylabel("Accuracy")
  plt.show()
  </code></pre>
  
  <p>Produces a result like this:<br>
  <img src="https://i.stack.imgur.com/SRtvd.png" alt="plot"></p>
  
  <p>I want the x axis to only have whole integer numbers. There should be a simple flag for this, but i can't find it.</p>