title: Pyqtgraph live plot
body: <p>I want to move plot by x-axis, but now all plot points, stay on one screen and start point doesn't move</p>
  
  <p>Window code - main windows code. Function updateplot run every 5s and set new data.</p>
  
  <pre><code>import sys
  from PyQt5 import QtWidgets, QtCore, QtGui
  import stack
  import pyqtgraph as pgt
  from random import uniform, normalvariate
  import random
  
  class ExampleApp(QtWidgets.QMainWindow, stack.Ui_MainWindow):
      def __init__(self):
          super().__init__()
          self.setupUi(self)
          self.graphicsView.getAxis('left').setLabel('Data Value', color='#0000ff')
          self.graphicsView.getAxis('bottom').setLabel('time', 's')
          self.graphicsView.showGrid(x=True, y=True)
          self.graphicsView.setYRange(0,10)
          self.graphicsView.addLine(y=5,pen=pgt.mkPen('y'))
          self.graphicsView.addLine(y=7,pen=pgt.mkPen('r'))
          self.curve = self.graphicsView.plot()
          self.L = []
          self.timer = QtCore.QTimer()
          self.timer.timeout.connect(self.updateplot)
          self.timer.start(500)
  
      def getdata(self):
          frequency = 0.5
          noise = random.normalvariate(0., 1.)
          new = 10.*math.sin(time.time()*frequency*2*math.pi) + noise
          return new
  
      def updateplot(self):
          val = round(uniform(0,10), 2)
          self.L.append(val)
          self.curve.setData(self.L)
          #QtGui.QGuiApplication.processEvents()
  
  
  def main():
      app = QtWidgets.QApplication(sys.argv)
      window = ExampleApp()
      window.show()
      app.exec_()
  
  if __name__ == '__main__':
      main()
  </code></pre>
  
  <p>Design code generate by designer(stack.py):
  Designer with PlotWidget insteadof </p>
  
  <pre><code>from PyQt5 import QtCore, QtGui, QtWidgets
  
  class Ui_MainWindow(object):
      def setupUi(self, MainWindow):
          MainWindow.setObjectName("MainWindow")
          MainWindow.resize(929, 429)
          self.centralwidget = QtWidgets.QWidget(MainWindow)
          self.centralwidget.setObjectName("centralwidget")
          self.graphicsView = PlotWidget(self.centralwidget)
          self.graphicsView.setGeometry(QtCore.QRect(9, 9, 901, 321))
          self.graphicsView.setObjectName("graphicsView")
          MainWindow.setCentralWidget(self.centralwidget)
  
          self.retranslateUi(MainWindow)
          QtCore.QMetaObject.connectSlotsByName(MainWindow)
  
      def retranslateUi(self, MainWindow):
          _translate = QtCore.QCoreApplication.translate
          MainWindow.setWindowTitle(_translate("MainWindow", "Data"))
  
  from pyqtgraph import PlotWidget
  </code></pre>