title: pyQt Matplotlib widget live data updates
body: <p>Writing in Python 2.7 using pyQt 4.8.5:</p>
  
  <p>How may I update a Matplotlib widget in real time within pyQt?
  Currently I'm sampling data (random.gauss for now), appending this and plotting - you can see that I'm clearing the figure each time and re-plotting for each call:  </p>
  
  <pre><code>def getData(self):
      self.data = random.gauss(10,0.1)
      self.ValueTotal.append(self.data)
      self.updateData()
  
  def updateData(self):
      self.ui.graph.axes.clear()
      self.ui.graph.axes.hold(True)
      self.ui.graph.axes.plot(self.ValueTotal,'r-')
      self.ui.graph.axes.grid()
      self.ui.graph.draw()
  </code></pre>
  
  <p>My GUI works though I think this is the wrong way to achieve this as its highly inefficient, I believe I should use the 'animate call'(?) whilst plotting, though I don't know how. </p>
  
  <p><img src="https://i.stack.imgur.com/UHKxa.png" alt="enter image description here"></p>