title: Matplotlib: Scale axis by multiplying with a constant
body: <p>Is there a quick way to scale axis in matplotlib?</p>
  
  <p>Say I want to plot </p>
  
  <pre><code>import matplotlib.pyplot as plt
  c= [10,20 ,30 , 40]
  plt.plot(c)
  </code></pre>
  
  <p>it will plot <a href="https://i.stack.imgur.com/8Pk4W.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8Pk4W.png" alt="enter image description here"></a></p>
  
  <p>How can I scale x-axis quickly, say multiplying every value with 5?
  One way is creating an array for x axis:</p>
  
  <pre><code>x = [i*5 for i in range(len(c))]
  plt.plot(x,c)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/CeUbl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CeUbl.png" alt="enter image description here"></a></p>
  
  <p>I am wondering if there is a shorter way to do that, without creating a list for x axis, say something like plt.plot(index(c)*5, c)</p>