title: Matplotlib and unit tests
body: <p>I have a GTK application that draws some plots of some live data. The code is split so that one method deals with creating the plots and another one with updating the data and re-drawing said plots.</p>
  
  <p>Clearly running the application allows me to see if the plots are sensible and look how I want them to look. However, this is a mechanical and visual test.</p>
  
  <p><em>Is there a way to unit test this?</em></p>
  
  <p>I could set a test method and mock all the calls to matplotlib then check that said calls were made. However, this feels like testing the implementation and not behaviour.</p>