title: plot sensor boolean data matplotlib
body: <p>I have data from two sensors that I want to visualize. Both sensors take  only 0/1 values. How can I change the xaxis labels to show the time series and y axis should have 2 labels 0 and 1 representing the value of sensors along the time series.</p>
  
  <pre><code>import pandas as pd
  import matplotlib.pyplot as plt
  
  def drawgraph(inputFile):
      df=pd.read_csv(inputFile)
      fig=plt.figure()
      ax=fig.add_subplot(111)
      y = df[['sensor1']]
      x=df.index
      plt.plot(x,y)
      plt.show()
  </code></pre>