title: Live Data Monitor: PyQtGraph
body: <p>I am working on a project where I will have to analyse signals coming from a device. I have a library working which gets me data from the device. As of now, I am collecting the data and then plotting it. I am interested in building a live data monitor which can plot a graph in real time. Upon searching, I figured out PyQtGraph is ideal for the task. I am not familiar with Qt, so I am looking for examples which I can modify to my needs. Some examples given in PyQtGraph docs update the plot real-time BUT I need something like a live monitor- where the graph is moving towards the right as it keeps receiving data.</p>
  
  <p>If it it something like a known continuous function, I can update the input <code>x - w*t</code> with <code>t</code> being the time so as to get the wave moving towards right. But this is discrete data, so I am not sure about how to get it working using PyQtGraph. So it would be great if someone could give some pointers on how to go about.</p>
  
  <p>As of now this is what I have</p>
  
  <p>Code</p>
  
  <pre><code>app = QtGui.QApplication([])
  #mw = QtGui.QMainWindow()
  #mw.resize(800,800)
  
  win = pg.GraphicsWindow(title="Basic plotting examples")
  win.resize(1000,600)
  win.setWindowTitle('pyqtgraph example: Plotting')
  
  # Enable antialiasing for prettier plots
  pg.setConfigOptions(antialias=True)
  
  p6 = win.addPlot(title="Updating plot")
  curve = p6.plot(pen='r')
  X_axis = numpy.linspace(0,100,12800)
  #'data' is my required y_axis containing 12800 values
  ydata = np.array_split(data,50)
  xdata = np.array_split(X_axis,50)
  ptr = 0
  def update():
      global curve, data, ptr, p6
      curve.setData(xdata[ptr%50],ydata[ptr%50])
      ptr += 1
  timer = QtCore.QTimer()
  timer.timeout.connect(update)
  timer.start(1000)
  </code></pre>
  
  <p>This is updating the data for every 2-second interval, but I want it to move towards the right.</p>