title: Matplotlib Line Overlap/Resolution
body: <p>I'm making a plot in Matplotlib where it is imperative for different lines to not overlap when they have differing x-values. For some reason, when I draw lines, there is overlap if they are close enough together (but not overlapping). For example,</p>
  
  <pre><code>fig = plt.figure(num=None, facecolor='w', edgecolor='k')
  ax = fig.add_subplot(2, 1, 1)
  ax.plot((0, 10000000), (3, 3), linewidth = 2, markersize = 0, clip_on = True, aa = True)
  ax.plot((10000001, 200000001), (3, 3), linewidth = 1, markersize = 0, clip_on = True, aa = True)
  
  plt.savefig('test.png', format='png')
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/O54og.png" alt="enter image description here">
  I want the blue line and the green line to not overlap at all, since 10000000 &lt; 10000001.</p>
  
  <p>I made the blue line slightly thicker, so if you zoom in, you can see how the blue and green lines overlap. I made the dpi very high, so it isn't a resolution problem. I will have to be dealing with large numbers because I am working with genome data--are the large numbers an issue? When I plot with x-values of <code>(0 to 10000)</code> and <code>(10001, 20000)</code>, the problem still exists. </p>
  
  <p>Thanks so much for your help.</p>