title: Plotting binary data in python
body: <p>I have some data that looks like:</p>
  
  <p><code>data = [1,2,4,5,9]</code> (random pattern of increasing integers)</p>
  
  <p>And I want to plot it in a binary horizontal line so that y=1 for every x value specified in <code>data</code> and zero otherwise.</p>
  
  <p>I have a few different <code>data</code> arrays that I'd like to stack, similar to this style (this is CCD clocking data but the plot format looks ideal)</p>
  
  <p><a href="https://i.stack.imgur.com/EzTHb.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EzTHb.gif" alt="binary plot"></a></p>
  
  <p>I think I need to create a list of ones for my data array, but how do I specify the zero value for everything not in the array?</p>
  
  <p>Thanks</p>