title: Matplotlib scatter plot with 2 y-points per x-point
body: <p>I want to create a Scatter plot using Matplotlib.</p>
  
  <p>I have an array of IDs for the x-axis. It looks something like this:</p>
  
  <pre><code>x = [1, 2, 3, ...]
  #Length = 418
  </code></pre>
  
  <p>For the y-axis, I have an array of tupples. It looks something like this:</p>
  
  <pre><code>y = [(1, 1), (1, 0), (0, 0), (0, 1), ...]
  #Length = 418
  </code></pre>
  
  <p>I would like to plot this in a scatter plot so that for each ID (on the x-axis) it shows a red dot for the first value of the corresponding tupple and a blue dot for the second value of the correspond tuple.</p>
  
  <p>I tried this code:</p>
  
  <pre><code>plt.plot(x, y, 'o')
  plt.xlim(xmin=900, xmax=1300)
  plt.ylim(ymin=-1, ymax=2)
  plt.yticks(np.arange(2), ('Class 0', 'Class 1'))
  plt.xlabel('ID')
  plt.ylabel('Class')
  plt.show()
  </code></pre>
  
  <p>It shows this result:</p>
  
  <p><img src="https://i.stack.imgur.com/FvuHX.png" alt="my_plot"></p>
  
  <p><strong>How can I make this plot more clear?</strong></p>
  
  <p><strong>Also, when I zoom in, I notice that the points are offset? How can I place them directly above each other?</strong></p>
  
  <p><img src="https://i.stack.imgur.com/G0jYm.png" alt="zoomed_plot"></p>