title: Matplotlib control which plot is on top
body: <p>I am wondering if there is a way to control which plot lies on top of other plots if one makes multiple plots on one axis. An example:</p>
  
  <p><a href="https://i.stack.imgur.com/1gniG.png" rel="noreferrer"><img src="https://i.stack.imgur.com/1gniG.png" alt="enter image description here"></a></p>
  
  <p>As you can see, the green series is on top of the blue series, and both series are on top of the black dots (which I made with a scatter plot). I would like the black dots to be on top of both series (lines). </p>
  
  <p>I first did the above with the following code</p>
  
  <pre><code>plt.plot(series1_x, series1_y)
  plt.plot(series2_x, series2_y)
  plt.scatter(series2_x, series2_y)
  </code></pre>
  
  <p>Then I tried the following</p>
  
  <pre><code>fig = plt.figure()
  ax1 = fig.add_subplot(111)
  ax1.plot(series1_x, series1_y)
  
  ax2 = fig.add_subplot(111)
  ax2.plot(series2_x, series2_y)
  
  ax3 = fig.add_subplot(111)
  ax3.scatter(series2_x, series2_y)
  </code></pre>
  
  <p>And some variations on that, but no luck.</p>
  
  <p>Swapping around the <code>plot</code> functions has an effect on which plot is on top, but no matter where I put the <code>scatter</code> function, the lines are on top of the dots.</p>
  
  <p><strong>NOTE:</strong></p>
  
  <p>I am using Python 3.5 on Windows 10 (this example), but mostly Python 3.4 on Ubuntu.</p>
  
  <p><strong>NOTE 2:</strong></p>
  
  <p>I know this may seem like a trivial issue, but I have a case where the series on top of the dots are so dense that the colour of the dots get obscured, and in those cases I need my readers to clearly see which dots are what colour, hence why I need the dots to be on top.</p>