real-time plotting example for matplotlib