title: How to generate a curve plot with enough spacing to accommodate a huge array of numbers
body: <p>I have the following simple python script.</p>
  
  <pre><code>import matplotlib.pyplot as plt
  import random
  
  size_of_numbers_to_be_plotted = 200
  
  my_array = []
  i = 0
  while i &lt; size_of_numbers_to_be_plotted:
      my_array.append(random.randint(1, 10))
      i += 1
  
  plt.plot(my_array)
  plt.ylabel('Random numbers')
  plt.show()
  </code></pre>
  
  <p>It simply plots an array of numbers which could contain a random value between 1 to 10. </p>
  
  <p>The plot looks okay with a few numbers in the array. Like say if <code>size_of_numbers_to_be_plotted</code> is set to 200 the plot looks okay and spaced out enough to understand like this.</p>
  
  <p><a href="https://i.stack.imgur.com/wDkfw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wDkfw.png" alt="plt_1"></a></p>
  
  <p>But, it becomes pretty cramped for room if <code>size_of_numbers_to_be_plotted</code> is set to 2000.</p>
  
  <p><a href="https://i.stack.imgur.com/ZDwzX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZDwzX.png" alt="plt_2"></a></p>
  
  <p><strong>Question:</strong><br>
  How can I make the plot in such a way that it allocates some space between each number plotted rather than stuffing up all the numbers in a cramped for room plot?<br>
  That might require the plot to be made scrollable I guess since 2000 numbers would not all fit in a horizontal length covering my whole screen?</p>