title: How to shift a line in a matplotlib plot?
body: <p>I am trying to plot two lists in python, one is <code>test1</code> and other is <code>predictions1</code> .</p>
  
  <p>I wish to plot the first 150 entries of the <code>test1</code> list and then plot the entries 101- 150 of <code>predictions1</code> list, so that the two plots get superimposed on one another. Here is what I tried:</p>
  
  <pre><code>import matplotlib.pyplot as plt
  plt.figure(figsize=(15,8))
  plt.plot(test1[1:150])
  plt.plot(predictions1[101:150], color='red')
  plt.show()
  </code></pre>
  
  <p>But I am getting the result:
  <a href="https://i.stack.imgur.com/TgwCR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TgwCR.png" alt="enter image description here"></a></p>
  
  <p>Clearly this is not what I wanted to achieve as I want the red plot to get superimposed over the blue plot towards the end. Please help.</p>