added real-time graphs using matplotlib