title: Pyplot divide X scale axis by number
body: <p>I have this code which plots curves on x and y axis defined by an array u</p>
  
  <pre><code>titulo = "lambda=0.5   M=200   N=10"
  
  M = 200
  N = 10
  u = calcula_u_a1(M,N)
  
  
  for i in range (0, M+1, int(M*0.1)):
  #     if i == 0 or i == round(0.1*M) or i == round(0.2*M) or i == round(0.3*M) or i == round(0.4*M) or i == round(0.5*M):
      plt.plot(u[i], label= "t=" + str(i/M))
      plt.legend(loc='best')
      plt.title(titulo)
      plt.xlabel('Distancia')
      plt.ylabel('Temperatura')
  
  
  
  plt.show()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/Orwjd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Orwjd.png" alt="enter image description here"></a></p>
  
  <p>What I need to do is divide the x scale, so instead of [0, ..., 10] it would be [0, ..., 1] (divide x scale by N)</p>
  
  <p>Anyway of doing that?</p>
  
  <p>Thanks in advance!</p>